2014-07-17 45 views
13

我試圖安裝diagrams(在陰謀沙箱)安裝圖/ arithmoi和arithmoi安裝過程中失敗了,給下面的消息:不能在Mac

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)

+0

你安裝了llvm嗎?如果沒有,請[在這裏](http://llvm.org/releases/download.html)。如果你有,在你的道路上「選擇」?另外,你應該升級你的GHC版本。 6.8天知道多大年紀。 – user2407038

+0

我還沒有安裝llvm。我會嘗試的。另外什麼是選擇?我嘗試了很多時間升級GHC,但總是因爲圖書館衝突而終結,所以我放棄了。 – mb14

+1

我已經使用'brew install llvm'安裝了'LLVM'。仍然得到完全相同的錯誤信息。 – mb14

回答

2

(自己的回答:我的情況有人有同樣的問題)我通過在may cabal文件中添加以下行來將arithmoi降級到4.0.4來解決它:

build-depend: arithmoi >= 0.4 < 0.4.1.1 

不得不刪除沙箱,重新安裝所有的東西,但從頭開始工作。

+1

缺少&&,謝謝壽! – Scott

12

您可以使用cabal install arithmoi -f -llvm構建不帶LLVM的arithmoi

+0

因爲我沒有在我的cabal文件中列出arithmoi,所以這在sanbox中不起作用。 – mb14

+1

嗯,我認爲這應該是「-f-llvm」 –

+1

替代方案,如果這樣做不起作用,那麼您可以隨時將--ghc-options =「 - fasm」作爲標誌安裝 –

9
cabal install diagrams --constraint "arithmoi -llvm" 

有沒有一種方法沒有指定版本的範圍。 這對我有用。

+0

它似乎確實工作。 – mb14