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

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.

Related

Cabal installation issues on Windows

I am having some issues installing packages on Windows using cabal. The following command:
cabal install ghc-mod
produces these errors
C:\temp> cabal install ghc-mod
Resolving dependencies...
Failed to install haskell-src-exts-1.15.0.1
cabal.exe: Error: some packages failed to install:
ghc-mod-4.1.3 depends on haskell-src-exts-1.15.0.1 which failed to install.
haskell-src-exts-1.15.0.1 failed while unpacking the package. The exception was:
C:\Users\...\AppData\Local\Temp\haskell-src-exts-1.15.0.1-55548\haskell-src- exts-1.15.0.1\dist-tmp:
MoveFileEx
"C:\\Users\\...\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-55548\\haskell-src-exts-1.15.0.1\\dist-tmp"
"C:\\Users\\...\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-55548\\haskell-src-exts-1.15.0.1\\dist":
permission denied (Acesso negado.)
hlint-1.9 depends on haskell-src-exts-1.15.0.1 which failed to install.
I have also tried:
cabal install haskell-src-exts
However I got the same error.
can someone help me?
UPDATE
Output error executing cabal install haskell-src-exts:
c:\> cabal install haskell-src-exts
Resolving dependencies...
Failed to install haskell-src-exts-1.15.0.1
cabal: Error: some packages failed to install:
haskell-src-exts-1.15.0.1 failed while unpacking the package. The exception was:
C:\Users\DIULLE~1\AppData\Local\Temp\haskell-src-exts-1.15.0.1-35992\haskell-src-exts-1.15.0.1\dist-tmp:
MoveFileEx
"C:\\Users\\DIULLE~1\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-35992\\haskell-src-exts-1.15.0.1\\dist-tmp"
"C:\\Users\\DIULLE~1\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-35992\\haskell-src-exts-1.15.0.1\\dist":
permission denied (Acesso negado.)
This has been a known bug for some time1, and seems to be fixed six days ago, so update your cabal2:
> cabal update
> cabal install cabal cabal-install
> cabal install ghc-mod
However, if you don't want to jump on the cabal-git-train, you can still unpack, configure and install packages by hand. This will prevent the behaviour, since it is triggered by moving temporary dictionaries and name clashes:
> cabal unpack haskell-src-exts
> cd haskell-src-exts*
> cabal configure
> cabal build
> cabal install
1: since the bug has been reported on 22nd Feb, it seems to affect all versions from >= 1.18.* to < 1.20.0.3.
2: make sure that you really run the new version.

Haskell cabal-install errors

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.

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 fails to install Idris language on OSX Lion

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?

GHC: double-conversion-0.2.0.1 unknown symbol

I'm trying to use the latest release of EclipseFP. Upon start, the scion-browser setup initializes, with everything going well until trying to install scion-browser-0.1. I get the following error in my Eclipse console:
...
Loading package double-conversion-0.2.0.1 ... linking ... ghc: /home/dpm/.cabal/lib/double-conversion-0.2.0.1/ghc-7.0.3/HSdouble-conversion-0.2.0.1.o: unknown symbol `_ZNK17double_conversion6Double5valueEv'
ghc: unable to load package `double-conversion-0.2.0.1'
cabal: Error: some packages failed to install:
scion-browser-0.1 failed during the building phase. The exception was:
ExitFailure 1
Apparently, ghc-pkg seems to think everything is OK with this package (ghc-pkg check prints nothing). Reinstalling double-conversion through cabal also changes nothing. Anybody any idea what's going on? I'm on Ubuntu 9.10 Linux, GHC 7.0.3 from the Haskell-Platform.
As indicated here :
close your eclipse and run this in your terminal:
cabal install blaze-textual --user -fnative --reinstall
cabal install aeson --user --reinstall
then, restart your eclipse.

Resources