0

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
Diego Saa
  • 1,426
  • 1
  • 13
  • 23

1 Answers1

1

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

Diego Saa
  • 1,426
  • 1
  • 13
  • 23
  • 1
    Uh ouch, you really seldom should use `sudo cabal install`. Are you sure it's justified in this case? – Tarrasch Nov 06 '12 at 05:34
  • I didn't know that... What is a better alternative? – Diego Saa Nov 06 '12 at 05:37
  • 1
    Never using `sudo` with cabal. – Thomas M. DuBuisson Nov 06 '12 at 05:44
  • The interesting question though is why it helped or was necessary in this case. In fact on OS X it is, at least with my setup, frequently necessary to use `sudo cabal install` (`-- user` implicit) as otherwise the use of `gcc` is inhibited. But this isn't that sort of case. – applicative Nov 06 '12 at 05:55
  • 1
    On Arch Linux it stores everything under ~/. Is that not the case on OSX machines as well? – Wes Nov 06 '12 at 06:12
  • Yes they are, but the location of files has absolutely nothing to do with what privileges might be necessary to change or generate them, especially when the latter is a complex process. People often think that `sudo cabal install pony` installs `can-i-have-a-pony` in `/usr/../bin` but `cabal` of course has no idea it was called with superuser privileges, and the executable will go into `~/.cabal/bin` As far as I can see all the remarks above are based on the opposite idea. – applicative Nov 07 '12 at 17:38