I followed the procedure here for installing GHC and cabal, and then for ghc-mod.
But, I get this error at this step
cabal update && cabal install cabal-install
Configuring cabal-install-1.24.0.2... Failed to install
cabal-install-1.24.0.2 cabal: Error: some packages failed to install:
cabal-install-1.24.0.2 failed during the configure step. ExitFailure
11
If you install haskell-platform via apt-get, version of ghc is under 7.10.3 until yakkety (Ubuntu 16.10).
This is problematic because cabal-1.24 requires ghc >= 8.0.1.
To solve this
install more recent version of ghc from its code,
just use stack and ghc-mod for stack.
P.S. if you are emacsen, I recommand you to use intero (site) instead of ghc-mod.
Related
I'm completely new to Haskell and I'm trying to replicate the code.world environment locally, so I need to install codeworld-api so that I can import CodeWorld. The problem is that when I run cabal install codeworld-api, it fails, and the following errors occur:
cabal: Error: some packages failed to install:
codeworld-api-0.7.0-JVbla7smM91CfqAXV0vVqz depends on codeworld-api-0.7.0
which failed to install.
haskell-src-exts-1.23.1-Z8xb2tkymYIClPofvAOw3 failed during the configure
step. The exception was:
ExitFailure 1
haskell-src-meta-0.8.7-GrcU6O1imfWLP5hRNzLFKK depends on
haskell-src-meta-0.8.7 which failed to install.
haskell-tests-0.1.0.0-IkWvWTmkph53PXtIhZGNWg depends on haskell-tests-0.1.0.0
which failed to install.
reflex-0.8.1.0-5XPDDia7wXx4bpQRZBxYDv depends on reflex-0.8.1.0 which failed
to install.
I also tried to add codeworld-api in the build-depends section in .cabal, but nothing changes.
I've read this, but --allow-newer also does nothing.
I tried, with no success:
cabal update
cabal install Cabal cabal-install
cabal new-install codeworld-api
cabal new-build
codeworld-api also doesn't show up in ghc-pkg list.
I have no idea what's happening...
Platform info
Ubuntu 20.04
cabal-install version 2.4.0.0
Cabal library version 2.4.0.1
ghc version 8.6.5
Packages installed from apt:
ghc
ghc-doc
cabal-install
I try install install glib via cabal
evgeny#virtuos:~$ cabal install glib-0.13.0.7
Resolving dependencies...
Failed to install glib-0.13.0.7
cabal: Error: some packages failed to install:
glib-0.13.0.7 failed during the configure step. The exception was:
user error (The package 'glib' requires Cabal library version -any && >=1.18
but no suitable version is installed.)
evgeny#virtuos:~$ cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
what's wrong?
OS: Ubuntu 14.10
Cabal 1.20.0.3
GHC: 7.6.3
Run cabal install cabal-install. Daniel Wagner's suggestion will most likely provide different results than cabal --version.
I have cabal 1.16 installed and trying to update:
alex#cf:~# cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
Trying to update:
alex#cf:~# sudo cabal install --global cabal-install
cabal: There is no package named 'cabal-install'.
You may need to run 'cabal update' to get the latest list of available
packages
At which point I run a cabal update, after which running cabal install returns the same as above. I followed by getting cabal from git, checking out 1.20.0.2 and run sudo cabal install Cabal/ cabal-install/
After a couple of minutes the prompt stops at that line:
[17 of 78] Compiling Distribution.PackageDescription ( Distribution/PackageDescription.hs, dist/build/Distribution/PackageDescription.o )
with the following message:
[17 of 78] Compiling Distribution.PackageDescription (Distribution/PackageDescription.hs, dist/build/Distribution/PackageDescription.o )
Failed to install Cabal-1.20.0.2
cabal: Error: some packages failed to install:
Cabal-1.20.0.2 failed during the building phase. The exception was:
ExitFailure 9
cabal-install-1.20.0.3 depends on Cabal-1.20.0.2 which failed to install.
Couldn't find anything about how to fix this and the error message is quite vague. Does anybody have any pointers? This is on a VPS running Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-43-generic x86_64)
Thanks!
#user2407038 was right, the exit code 9 is caused by running out of memory. Upgrading the ram on the VPS fixed the issue.
I'm trying to install Yesod on my Mac (running Mavericks), but installation fails because of an error installing Persistent. Specifically, cabal install persistent yields:
Failed to install persistent-1.3.0.2
Updating documentation index /Users/Max/Library/Haskell/doc/index.html
cabal: Error: some packages failed to install:
persistent-1.3.0.2 failed during the building phase. The exception was:
ExitFailure 11
(The full output is available as a gist)
I don't think this is an issue with conflicts, because I ran rm -rf ~/.ghc ~/.cabal before trying this (though I think 3 globally installed packages might not have been erased—unsure).
I'm using the latest Haskell Platform with the ghc-clang-wrapper script.
Cabal versions:
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
GHC version:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
Reinstalling Haskell platform allowed me to install Persistent, but the real issue was that I needed to install gcc48. Installing this cleared everything up. https://stackoverflow.com/a/21285413/1176156
I am having lots of problems with cabal-install:
1: Every time I do cabal update, it tells me to do cabal install cabal-install, so I do, and then when I do cabal update again, it says the same thing.
2: When I try to install ghc-mod from hackage, it gives me this error:
[username#arch ~]$ cabal install ghc-mod
In order, the following will be installed:
haskell-src-exts-1.14.0 (reinstall) changes: pretty-1.1.1.1 -> 1.1.1.0
hlint-1.8.55 (reinstall)
ghc-mod-3.1.4
setup: The program happy version >=1.17 is required but it could not be found.
ghc-mod-3.1.4 depends on haskell-src-exts-1.14.0 which failed to install.
haskell-src-exts-1.14.0 failed during the configure step.
hlint-1.8.55 depends on haskell-src-exts-1.14.0 which failed to install.
So the problem was The program happy version >=1.17 is required but it could not be found., so I installed happy 1.19.2 using cabal install happy without problems.
I tried cabal install ghc-mod again, same error, so I tried cabal install haskell-src-exts --reinstall --force-reinstalls. It gave me the following error:
[username#arch ~]$ cabal install haskell-src-exts --reinstall --force-reinstalls
Configuring haskell-src-exts-1.14.0...
setup: The program happy version >=1.17 is required but it could not be found.
Failed to install haskell-src-exts-1.14.0
cabal: Error: some packages failed to install:
haskell-src-exts-1.14.0 failed during the configure step. The exception was:
ExitFailure 1
Basically The program happy version >=1.17 is required but it could not be found.. So happy is the problem again?
I have also tried downloading the tar.gz files from hackage and using cabal install on the
.cabal file, also modified the .cabal file to ignore dependencies, still failed.
cabal install places executables in ~/.cabal/bin.
If you add it to your path, you will be able to use the new executables installed by cabal:
$ PATH=$HOME/.cabal/bin:$PATH
I encountered with same problem and I solved the problem with installing happy package(confusing package name). So install it with your package manager(apt-get, pacman etc) before install package with cabal. This should be fix the problem.