cabal安装cabal-install无法解决依赖关系

时间:2014-09-04 03:46:14

标签: haskell osx-mavericks homebrew cabal haskell-platform

我刚做了brew install haskell-platform并安装了 Glorious Glasgow Haskell编译系统7.6.3版

$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library

$ cabal update
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install

$ cabal install cabal-install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: cabal-install-1.20.0.3
rejecting: zlib-0.5.4.1, 0.5.4.0, 0.5.3.3, 0.5.3.2, 0.5.3.1, 0.5.2.0, 0.5.0.0,
0.4.0.4, 0.4.0.3, 0.4.0.2, 0.4.0.1, 0.4, 0.3, 0.2 (global constraint requires 
installed instance)

我不明白这里的问题是什么,我第一次安装了所有东西。

1 个答案:

答案 0 :(得分:8)

我在安装之前只有一个错误的~/.cabal/config文件。

我做了

$ rm -rf ~/.ghc ~/.cabal
$ brew rm ghc 
$ brew rm haskell-platform
$ brew install haskell-platform

并安装好了

$ cabal install cabal-install
Resolving dependencies...
Downloading Cabal-1.20.0.2...
...