无法在Mac上安装图表/ arithmoi

时间:2014-07-17 07:02:03

标签: macos haskell cabal

我尝试安装diagrams(在cabal沙箱中)并在arithmoi安装期间失败,并显示以下消息:

Preprocessing library arithmoi-0.4.1.1...

no location info>:
    Warning: Couldn't figure out LLVM version!
         Make sure you have installed LLVM
ghc: could not execute: opt
Failed to install arithmoi-0.4.1.1
cabal: Error: some packages failed to install:
arithmoi-0.4.1.1 failed during the building phase. The exception was:
ExitFailure 1
diagrams-1.2 depends on arithmoi-0.4.1.1 which failed to install.
diagrams-contrib-1.1.2 depends on arithmoi-0.4.1.1 which failed to install.

我不确定为什么我没有安装LLVM后端或为什么它可以执行opt。 任何的想法 ? (我在OS 10.8上使用GHC 7.6.3)

3 个答案:

答案 0 :(得分:12)

您可以使用arithmoi构建cabal install arithmoi -f -llvm而不使用LLVM。

答案 1 :(得分:9)

cabal install diagrams --constraint "arithmoi -llvm"

有一种方法可以不指定版本范围。 这对我有用。

答案 2 :(得分:2)

(自己的答案:我的情况有人有同样的问题)我通过在may cabal文件中添加以下行将arithmoi降级到4.0.4来解决它:

build-depend: arithmoi >= 0.4 < 0.4.1.1

必须删除沙盒并从头开始重新安装所有内容,但最后才能使用。