我在Mac上使用Mavericks和XCode 5。我已经安装了最新的Haskell平台。这就是我在终端中获得的内容
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$
答案 0 :(得分:1)
错误天真地表明你需要
cabal install --reinstall random
不是基础。但是,它暗示了一个与您的环境有关的更基本的问题。
你基本上没有安装/重新安装基座,因为它是由GHC,IIRC提供的。然而,cabal发现的随机包是针对不同版本的基础(即不同版本的GHC)编译的。如果您想使用haskell-platform中的软件包,您还需要使用它附带的GHC,因此请确保您的环境中没有不同的GHC。