Cabal hell to install cabal-nirvana? - haskell

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 :)

Related

Cabal Install failing to install cabal-install

Just installed the Haskell platform. When I do
$ cabal install cabal cabal-install
I get
Build log ( /Users/robbiecarlton/.cabal/logs/cabal-install-1.22.6.0.log ):
Configuring cabal-install-1.22.6.0...
Building cabal-install-1.22.6.0...
Preprocessing executable 'cabal' for cabal-install-1.22.6.0...
<command line>: cannot satisfy -package-id HTTP-4000.2.10-da371776b88c2889959897a2dc40abe7
(use -v for more information)
cabal: Error: some packages failed to install:
cabal-install-1.22.6.0 failed during the building phase. The exception was:
ExitFailure 1
The same thing happens trying to install manually from source.

Cabal: File in tar archive is not in the expected directory

I have been unable to install any packages using Cabal, getting an error saying that the tar archive is not in the expected directory. For example, if I try to do, cabal install mtl, I get the following error:
Resolving dependencies...
Failed to install text-1.2.1.1
cabal: Error: some packages failed to install:
text-1.2.1.1 failed while unpacking the package. The exception was:
user error (File in tar archive is not in the expected directory. Expected:
"." but got the following hierarchy: ["text-1.2.1.1"])
I have run cabal update, and cabal --version gives the following:
$ cabal --version
cabal-install version 1.22.5.0
using version 1.22.4.0 of the Cabal library
Anyone have any ideas as to why this might be happening? Let me know if you need any additional information.
That version of cabal-install had a big making it almost completely unusable. Upgrading should solve this 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!

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.

Cannot install GLFW-b-0.0.2.10 package

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.

Resources