2016-05-10 30 views
0

我想安裝的是scalpel庫。我在安裝cabal庫時遇到問題

當我嘗試:

cabal install -p scalpel 

我有以下的輸出:

Microsoft Windows [Version 6.3.9600] 
(c) 2013 Microsoft Corporation. All rights reserved. 

C:\Users\maion_000>cabal install -p scalpel 
Resolving dependencies... 
In order, the following would be installed: 
curl-1.3.8 +new-base (new package) 
regex-base-0.93.2 (reinstall) changes: bytestring-0.10.0.2 -> 0.10.6.0, 
mtl-2.1.2 -> 2.2.1 
regex-tdfa-1.2.2 (new package) 
tagsoup-0.13.10 (new package) 
scalpel-0.3.0.1 (new package) 
cabal: The following packages are likely to be broken by the reinstalls: 
regex-posix-0.95.2 
regex-compat-0.95.1 
haskell-platform-2013.2.0.0 
Use --force-reinstalls if you want to install anyway. 

我該怎麼辦?我嘗試了--force-reinstalls,它給出了更多的錯誤。

+6

它會最好切換到使用['stack'](http://docs.haskellstack.org/en/stable/README/)或['cabal sandboxes'](http://coldwa.st/e/blog/2013 -08-20-Cabal-sandbox.html) - 也許你需要刪除當前的.cabal文件夾 – epsilonhalbe

+0

'scalpel'在堆疊https://www.stackage.org/nightly-2016-05-08/package/scalpel -0.3.0.1;如果你學習如何使用'stack'進行安裝,你將不必處理這類問題。 – Michael

+0

看起來你從2013年開始使用haskell平臺? ghc 7.6.2附帶 - 很多軟件包都認爲它們在支持窗口的末尾。無論如何,使用更新的ghc會更好。這樣做後,如果你堅持使用cabal,你可能需要考慮使用沙箱來防止將來出現這樣的問題。 – sclv

回答

1

Cabal可以變成非常有problematic,並且依賴關係彼此阻塞。

如果可以,請使用stackcabal sandbox。 此隔離創建可以防止「依賴地獄」的孤立環境。

stack automaticall爲每個項目創建一個新的沙盒,而cabal sandbox必須手動觸發。

你可以嘗試刪除.cabal和你的主目錄,也許.ghc來解決目前的情況,但該修復將是暫時的,如果你不使用沙箱(這正是stackcabal sandbox做)