如何让Haskell平台的ghc-pkg在MAC OSX上运行

时间:2010-05-15 19:34:28

标签: macos haskell cabal

我已经为MAC OSX安装了最新的Haskell平台,当我对Cabal做任何事情时,我收到错误“安装程序:无法解析'ghc-pkg dump'的输出”。

所以我查看了我的版本:

ralphtq$ ghc-pkg list Cabal
/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d
   Cabal-1.8.0.2
ralphtq-mac-mini:cabal-install-0.6.4 ralphtq$ cabal --version
cabal-install version 0.6.2
using version 1.6.0.3 of the Cabal library 

这告诉我,尽管我有Cabal 1.8,但cabal-instal的版本为0.6.2。我试图纠正使用darcs获取最新版本的cabal-install,但我无法通过错误:

ralphtq$ sh bootstrap.sh 
Checking installed packages for ghc-6.12.1...
parsec is already installed and the version is ok.
network is already installed and the version is ok.
Cabal is already installed and the version is ok.
mtl is already installed and the version is ok.
HTTP is already installed and the version is ok.
zlib is already installed and the version is ok.
cleaning...
Linking Setup ...
Configuring cabal-install-0.9.1...
Setup: At least the following dependencies are missing:
Cabal ==1.9.*

预计Cabal将> = 1.9。

我尝试安装以前版本的Cabal但出现以下错误:

...
...
[50 of 51] Compiling Distribution.Simple ( Distribution/Simple.hs, Distribution/Simple.o )
[51 of 51] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
Configuring Cabal-1.6.0.2...
Setup: failed to parse output of 'ghc-pkg dump'

我回到了同样的问题。

我也试过完全重新安装平台。

我的下一个选择是什么?感谢,谢谢。

1 个答案:

答案 0 :(得分:2)

您已经安装了旧版本的Haskell平台,或者您有一个混合环境,您已经安装在现有的旧安装的顶部,因此现在混合了6.10的ghc-pkg版本。 x和6.12.x

尝试删除那些ghc-pkg和cabal二进制文件,然后安装平台。这样你就不会有那些旧的可执行文件了。