Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cabal installation issues

Tags:

haskell

cabal

I am having some issues installing packages using cabal. Issuing the following command:

> cabal install ghc-mod stylish-haskell haskell-docs hdevtools

produces these errors

Building yaml-0.8.8.3...
Preprocessing library yaml-0.8.8.3...
<command line>: cannot satisfy -package-id aeson-0.7.0.6-b19228a032fb34be4eef122
913c6e81a
    (use -v for more information)
Failed to install yaml-0.8.8.3
cabal: Error: some packages failed to install:
ghc-mod-4.1.1 depends on haskell-src-exts-1.15.0.1 which failed to install.
haskell-docs-0.2.0.0 failed during the building phase. The exception was:
ExitFailure 1
haskell-src-exts-1.15.0.1 failed while unpacking the package. The exception
was:
C:\Users\Arnob\AppData\Local\Temp\haskell-src-exts-1.15.0.1-5840\haskell-src-ext
s-1.15.0.1\dist-tmp:
MoveFileEx
"C:\\Users\\Arnob\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-5840\\haskell
-src-exts-1.15.0.1\\dist-tmp"
"C:\\Users\\Arnob\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-5840\\haskell
-src-exts-1.15.0.1\\dist":
permission denied (Access is denied.)
hdevtools-0.1.0.5 depends on unix-2.7.0.1 which failed to install.
hlint-1.8.61 depends on haskell-src-exts-1.15.0.1 which failed to install.
stylish-haskell-0.5.10.0 depends on yaml-0.8.8.3 which failed to install.
unix-2.7.0.1 failed during the configure step. The exception was:
ExitFailure 1
yaml-0.8.8.3 failed during the building phase. The exception was:
ExitFailure 1

I have also tried installing the windows fork of hdevltools by running

> cabal install

on the cloned github repo. However this also produces errors.

As a last ditch effort, I tried changing the remote repo to "stackage", i.e.

remote-repo: stackage: http://www.stackage.org/stackage/44ea140bd97cbb0f6140d331f8f7f8667a637eda

but this did not help either.

All help is appreciated!

like image 447
Arnob Avatar asked Jun 26 '26 23:06

Arnob


1 Answers

It looks like this is a Windows specific issue, where cabal cannot move some required files in the haskell-src-exts distribution (the issue is also seen in other packages, such as pandoc). This might be related to the issue reported here: https://github.com/haskell/cabal/issues/1698

I was able to get the haskell-src-exts package installed by doing the following:

> cabal unpack haskell-src-exts
> cd haskell-src-exts
> cabal install
like image 101
Arnob Avatar answered Jun 29 '26 22:06

Arnob