2012-04-17 216 views
7

我试图在我的mac中安装cabal-dev。完成后,我尝试运行./bin/build。得到这个错误信息。在haskell中安装依赖关系

cabal: cannot configure cabal-dev-0.9.1. It requires MonadRandom ==0.1.*, tar 
==0.3.*, test-framework >=0.3 && <0.6 and test-framework-hunit >=0.2 
There is no available version of MonadRandom that satisfies ==0.1.* 
There is no available version of tar that satisfies ==0.3.* 
There is no available version of test-framework that satisfies >=0.3 && <0.6 
There is no available version of test-framework-hunit that satisfies >=0.2 

这是怎么回事?我如何在Haskell中安装依赖文件? 我从Haskell platform下载并安装。

回答

9

您不必使用该构建脚本;您只需运行cabal install cabal-dev即可安装cabal-dev,该软件将自动下载并安装cabal-dev及其依赖项。

但是,如果您确实想使用它,请在cabal-dev的源代码目录中首先尝试cabal install --only-dependencies(其中包含cabal-dev.cabal)。该脚本的目的是避免避免安装到全局数据库和用户数据库数据库中 - 基本上,它使用相同的沙箱cabal-dev本身。这可能是不值得的,因为cabal-dev像其他程序一样安装得很好。

2

发出命令cabal install cabal-dev。它会解决你的依赖关系,假设你有标准的cabal dist。