Cabal安装ghc-mod抱怨破损的包裹(GHC 7.6.3)

时间:2014-05-09 15:30:12

标签: haskell cabal

我在Ubuntu上使用:GHC 7.6.3(由apt-get install haskell-platform)从当前仓库安装。

尝试安装ghc-mod,因为我的ide插件要求它。

❯ cabal install ghc-mod             
Resolving dependencies...
In order, the following would be installed:
cmdargs-0.10.7 (new package)
convertible-1.1.0.0 (new package)
ghc-syb-utils-0.2.1.2 (new package)
hashable-1.2.1.0 (reinstall) changes: text-0.11.3.1 -> 1.1.0.1
hscolour-1.20.3 (new package)
polyparse-1.9 (new package)
cpphs-1.18.4 (new package)
haskell-src-exts-1.15.0.1 (new package)
transformers-base-0.4.2 (new package)
monad-control-0.3.3.0 (new package)
lifted-base-0.2.2.2 (new package)
io-choice-0.0.5 (new package)
unordered-containers-0.2.4.0 (reinstall)
uniplate-1.6.12 (new package)
hlint-1.8.61 (new package)
ghc-mod-4.1.0 (new package)
cabal: The following packages are likely to be broken by the reinstalls:
unordered-containers-0.2.3.0
case-insensitive-1.2.0.0
case-insensitive-1.1.0.2
Use --force-reinstalls if you want to install anyway.

解决此类问题的常用步骤是什么? (这是我第一次尝试使用Haskell)

1 个答案:

答案 0 :(得分:2)

  • 选项1:坚持haskell platform versions。请参阅更改行并尝试添加约束以使用平台文本库版本。

    cabal install ghc-mod --constraint = text == 0.11.3.1

  • 选项2:在特定文件夹中的sandbox内构建它。您必须将sandbox bin文件夹添加到路径中,或将可执行文件复制或链接到$ HOME / bin文件夹。

您必须更新cabal-install以使用cabal的新沙箱功能(v.1.18 +)。替代品是cabal-dev,hsenv和virthualenv

  • 选项3:重置$ HOME / .ghc和$ HOME / .cabal / lib中的库文件夹