user3464172
user3464172

Reputation: 51

Installing hoogle with cabal on OSX

I am using Mavericks and XCode 5 on my Mac. I have installed the latest Haskell platform. This is what I get in a terminal

Last login: Wed Mar 26 13:41:57 on ttys000
Jans-MacBook-Pro-3:~ janbrosius$ cabal install hoogle
Resolving dependencies...
Configuring shake-0.11.4...
cabal: The following installed packages are broken because other packages they
depend on are missing. These broken packages must be rebuilt before they can
be used.
package random-1.0.1.1 is broken due to missing package
        base-4.6.0.1-b06eaf57abc740815ee8873f590d123c,
time-1.4.0.1-0e909e73241a97b6fa7be451eb8c4cc6
Failed to install shake-0.11.4
cabal: Error: some packages failed to install:
hoogle-4.2.30 depends on shake-0.11.4 which failed to install.
shake-0.11.4 failed during the configure step. The exception was:
ExitFailure 1
Jans-MacBook-Pro-3:~ janbrosius$ cabal install base
Resolving dependencies...
All the requested packages are already installed:
base-4.6.0.1
Use --reinstall if you want to reinstall anyway.
Jans-MacBook-Pro-3:~ janbrosius$ 

Upvotes: 1

Views: 349

Answers (1)

Boyd Stephen Smith Jr.
Boyd Stephen Smith Jr.

Reputation: 3202

The error naively indicates you need to

cabal install --reinstall random

not base. But, it hints at a more fundamental issue with your environment.

You basically never install/reinstall base, as it is provided by GHC, IIRC. However, the random package that cabal is finding was compiled against a different version of base (i.e. a different version of GHC). If you want to use the packages from the haskell-platform, you need to be using the GHC that comes with it as well, so make sure you don't have a different GHC in your environment.

Upvotes: 1

Related Questions