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!
Related
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
I'm trying to install the Idris language in an OSX Lion using the installation guide provided on the official tutorial. I have alraedy installed GMP. This is the error I get:
$ cabal install idris
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
[1 of 1] Compiling Main ( /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/Setup.hs, /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/Main.o )
Linking /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/setup ...
setup: The program llvm-config version ==3.3.* is required but it could not be
found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on llvm-general-3.3.5.0 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
llvm-general-3.3.5.0 failed during the configure step. The exception was:
ExitFailure 1
Trying to install Idris without LLVM produces this error:
$ cabal install idris -f-LLVM
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on libffi-0.1 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
I was having this same problem on OSX Mavericks. To get Idris to compile, I used homebrew to install gmp, then I had to do 'export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig', and then 'cabal install idris -f-LLVM'. I got the tip to export the PKG_CONFIG_PATH variable from this site:
https://groups.google.com/d/msg/idris-lang/gxcdvRIA2OI/NqKSd4zHkI4J
Mavericks already had libffi installed, and I didn't want to install a second copy from source, which is what the PKG_CONFIG_PATH trick helped me avoid. Do 'brew info libffi' to find the correct path to export. Hopefully someone will create a homebrew formula for Idris soon...
The first error indicates you should install the LLVM development packages of your distribution (not through cabal) and the second indicates you should install the development package for the GCC libffi library. What Linux distribution are you using? Or are you on Windows/Mac?
I'm trying to install cabal-nirvana on OSX 10.7.5, but I get the following output:
cabal install cabal-nirvana
Resolving dependencies...
Downloading cabal-nirvana-0.2.2...
Configuring cabal-nirvana-0.2.2...
Building cabal-nirvana-0.2.2...
Preprocessing executable 'cabal-nirvana' for cabal-nirvana-0.2.2...
<command line>: cannot satisfy -package-id HTTP-4000.2.3-c26f702c170ca487dfea54c2f3d6d4c0
(use -v for more information)
cabal: Error: some packages failed to install:
cabal-nirvana-0.2.2 failed during the building phase. The exception was:
ExitFailure 1
Any ideas?
In case it helps,
ghc: 7.4.1
cabal-install: 0.14.0
When I do ghc-pkg check, I get the following output:
WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/7.4.1- i386/usr/lib/ghc-7.4.1/package.conf.d/package.cache
use 'ghc-pkg recache' to fix.
Warning: haddock-interfaces: /Library/Haskell/ghc-7.4.1/lib/GLUT-2.1.2.1/doc/html/GLUT.haddock doesn't exist or isn't a file
Warning: haddock-interfaces: /Library/Haskell/ghc-7.4.1/lib/haskell-platform-2012.2.0.0/doc/html/haskell-platform.haddock doesn't exist or isn't a file
Warning: haddock-html: /Library/Haskell/ghc-7.4.1/lib/haskell-platform-2012.2.0.0/doc/html doesn't exist or isn't a directory
Nevermind... I did the 'ghc-pkg recache' and a 'sudo cabal update cabal-install', and then I was able to install cabal-nirvana without issues... The keyword here appears to be 'sudo'... D'oh!
... And by "Nevermind" I don't mean the Nirvana album :)
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.
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.