10
votes

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
2
This doesn't address the error shown, but can you just run cabal install quickcheck?jtobin
I suspect a broken package or something like that. If you run "ghc-pkg check" and give us the results, that migh assist in diagnosing the problem.mhwombat
I get the error: WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/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 directoryTom
Run ghc-pkg recache, and then ghc-pkg check again. It looks as though your HTTP package went awol.Daniel Fischer
Hey thanks for your reply. I get the following error when trying to recache: ghc-pkg: /Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/lib/ghc-7.4.1/package.conf.d/package.cache: you don't have permission to modify this fileTom

2 Answers

8
votes

Try:

sudo ghc-pkg recache

I had the same problem and that works for me.

2
votes

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.