简体   繁体   English

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

[英]Cabal install ghc-mod complains on broken packages (GHC 7.6.3)

I use: GHC 7.6.3 on Ubuntu (installed it from current repo by apt-get install haskell-platform) . 我在Ubuntu上使用:GHC 7.6.3(通过apt-get install haskell-platform)从当前的repo安装它apt-get install haskell-platform)

Trying to install ghc-mod , since my ide plugin asks for it. 尝试安装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.

What are the usual steps to resolve such a problem? 解决此类问题的常用步骤是什么? (that's my first try to work with Haskell) (这是我第一次尝试使用Haskell)

  • Option 1: Stick to the haskell platform versions . 选项1:坚持使用haskell平台版本 See the changes lines and Try adding a constraint to use your platform text library version. 请参阅更改行并尝试添加约束以使用平台文本库版本。

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

  • Option 2: build it in a sandbox within a specific folder. 选项2:在特定文件夹中的沙箱中构建它。 You'll have to add the sandbox bin folder to the path or copy or link the executables to your $HOME/bin folder. 您必须将sandbox bin文件夹添加到路径中,或将可执行文件复制或链接到$ HOME / bin文件夹。

You will have to update cabal-install to use cabal's new sandbox feature (v.1.18+). 您必须更新cabal-install以使用cabal的新沙箱功能(v.1.18 +)。 Alternatives are cabal-dev, hsenv and virthualenv 替代品是cabal-dev,hsenv和virthualenv

  • Option 3: Reset your libraries folders in $HOME/.ghc and $HOME/.cabal/lib 选项3:重置$ HOME / .ghc和$ HOME / .cabal / lib中的库文件夹

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM