Cannot install GLFW-b-0.0.2.10 package - haskell

When I do
cabal install GLFW-b
I get an error:
Resolving dependencies...
<command line>: cannot satisfy -package Cabal-1.10.1.0:
Cabal-1.10.1.0-49678efb6bfc399545e2b61629b900e2 is unusable due to missing or recursive dependencies:
process-1.0.1.5-107ac5b78a5845608025ca13d328fdc5
(use -v for more information)
cabal: Error: some packages failed to install:
GLFW-b-0.0.2.10 failed during the configure step. The exception was:
ExitFailure 1
I am running the Haskell Platform 2010.2.0.0. Does anybody else get this? How can I fix this error?

The Haskell Platform version you're using included Cabal-1.8.0.6. The simplest solution should be to upgrade to the latest Haskell Platform which includes Cabal-1.10.1.0.

Related

When I try to install hlint I get errors surrounding old-time-1.1.0.3

I first tried to install Hlint. cabal install hlint but then I got the error:
cabal: Error: some packages failed to install:
cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.18.2 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.37 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77
Then I tried to install ghc-mod since I read that hlint is a dependency of that package(?). Thinking that it might resolve the problem. So i did cabal install ghc-mod which gave me the error.
cabal: Error: some packages failed to install:
cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install.
ghc-mod-5.6.0.0 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.17.1 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.35 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77
So it seems to be the same problem, around my the package old-time-1.1.0.3.
The best way to know where it fails is to go through each failed package and install them one after the other.
I had issue with haskell-src-exts in which showed up in hlint and when I tried to cabal install haskell-src-exts it was happythat wasn't properly installed.
There are lots of variables that could be at play to explain what's going on, including cabal-install and ghc versions. It would be useful if you included the cabal --version and ghc --version output in your question.
That said: I'd recommend trying out the installation using Stack. Once you have Stack installed (on POSIX systems, usually sufficient to run curl -sSL https://get.haskellstack.org/ | sh), you can install with stack --resolver lts-6.16 --install-ghc --no-system-ghc install hlint.
Are you on Windows or Linux? What does ghc --version say? What about ghc-pkg old-time? I recommend trying to run cabal install old-time directly, which should reproduce the error directly.
Solution by OP.
Modify your cabal config file (you can verify the location by running "cabal user-config init") to contain the following lines:
extra-prog-path: C:\Program Files\Haskell Platform\8.0.1\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\include

Cabal installation issues

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!
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
Your problem is listed right in Cabal's error message:
MoveFileEx ... ...:
permission denied (Access is denied.)
So it seems you have a permission problem with your Windows installation (or at least your user temp folder), which is why Cabal stumbles.

Cabal Cabal-Install not working, strange error

I need to install Yesod and dependancies trough Cabal, unfortunately I'm not able to update cabal. Shell output:
...$ sudo cabal install cabal-install
Resolving dependencies...
Configuring cabal-install-1.18.0.2...
/tmp/24453.c:1:12:
warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
^
1 warning generated.
Building cabal-install-1.18.0.2...
Preprocessing executable 'cabal' for cabal-install-1.18.0.2...
<command line>: cannot satisfy -package-id HTTP-4000.2.8-cdf033f9d7051824f52cd5101df67509
(use -v for more information)
Failed to install cabal-install-1.18.0.2
cabal: Error: some packages failed to install:
cabal-install-1.18.0.2 failed during the building phase. The exception was:
ExitFailure 1
Anyone knows how to fix it? Nothing really makes sense to me.
The solution can be found here: Installing & Building GHC with OSX Mavericks GHC
The commandline tools from apple are required!
Thanks!

cabal error: Could not find module `GHC.TypeLits'. How do I fix this?

I get the following when trying to install Hlearn:
$ cabal install HLearn-distributions --ghc-options=-XConstraintKinds
Resolving dependencies...
Configuring HLearn-distributions-0.1.0.1...
Building HLearn-distributions-0.1.0.1...
Preprocessing library HLearn-distributions-0.1.0.1...
src\HLearn\Models\Distributions\Moments.hs:13:14:
Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
src\HLearn\Models\Distributions\Moments.hs:24:8:
Could not find module `GHC.TypeLits'
Perhaps you meant GHC.Types (needs flag -package ghc-prim)
Use -v to see a list of the files searched for.
cabal.exe: Error: some packages failed to install:
HLearn-distributions-0.1.0.1 failed during the building phase. The exception
was:
ExitFailure 1
I've tried installing the package using cabal (cabal install ghc-prim) but there's no such package. Also tried
$ cabal install HLearn-distributions --ghc-options=-XConstraintKinds -f-package ghc-prim
cabal.exe: There is no package named 'ghc-prim'.
You may need to run 'cabal update' to get the latest list of available
packages.
Any suggestions?
The module GHC.TypeLits is only available from base-4.6 on, with ghc-7.6.1.
I don't see any guards around the import, so the stated constraints on base in the build-depends are wrong in the versions 0.1.0.0 and 0.1.0.1.
If you want to install that package, you have to upgrade to ghc-7.6 or install a version < 0.1,
$ cabal-install "HLearn-distributions < 0.1"

Error when running cabal-install: ExitFailure 1 (Mac OS X lion)

I get the following error when trying to run cabal install cabal-install
I have installed the haskell platform from: http://www.haskell.org/platform/ for Mac OS X Lion. I want to run cabal install cabal-install so I can install quickcheck
When trying to update, I get this erro.
$ cabal install cabal-install
Resolving dependencies...
Configuring cabal-install-1.16.0...
Building cabal-install-1.16.0...
Preprocessing executable 'cabal' for cabal-install-1.16.0...
<command line>: cannot satisfy -package-id HTTP-4000.2.3-d6c69f84aec25261a9a3f6946119d9d2
(use -v for more information)
cabal: Error: some packages failed to install:
cabal-install-1.16.0 failed during the building phase. The exception was:
ExitFailure 1
Try:
sudo ghc-pkg recache
I had the same problem and that works for me.
Go to your .cabal/config file, look for the line that says "library-profiling: ".
This should be set to "False" for MacOSX, otherwise it will fail to find the packages that are installed. You'll get funny errors from the build phase where it was unable to import certain modules because "maybe" certain packages aren't installed.

Resources