cabal install cabal-install errors out on linux

a 夏天 提交于 2019-12-02 08:23:41

问题


Am using linux (centos 6.6).When I try to run cabal install cabal-install command am getting following errors

cabal: cannot configure unix-2.7.0.1. It requires base >=4.5 && <4.8
For the dependency on base >=4.5 && <4.8 there are these packages:
base-4.5.0.0, base-4.5.1.0, base-4.6.0.0, base-4.6.0.1, base-4.7.0.0 and
base-4.7.0.1. However none of them are available.
base-4.5.0.0 was excluded because base-4.3.1.0 was selected instead
base-4.5.0.0 was excluded because of the top level dependency base -any
base-4.5.1.0 was excluded because base-4.3.1.0 was selected instead
base-4.5.1.0 was excluded because of the top level dependency base -any
base-4.6.0.0 was excluded because base-4.3.1.0 was selected instead
base-4.6.0.0 was excluded because of the top level dependency base -any
base-4.6.0.1 was excluded because base-4.3.1.0 was selected instead
base-4.6.0.1 was excluded because of the top level dependency base -any
base-4.7.0.0 was excluded because base-4.3.1.0 was selected instead
base-4.7.0.0 was excluded because of the top level dependency base -any
base-4.7.0.1 was excluded because base-4.3.1.0 was selected instead
base-4.7.0.1 was excluded because of the top level dependency base -any

Note: caball-install version 0.10.2 using version 1.10.2.0 of the Cabal library
GHC version 7.0.4
haskell-platform-2011.4.0.0-6.el6.x86_64

How to resolve it.pls help!


回答1:


This issue is because of an old version of ghc-7.0.4.I downloaded ghc 7.8.3 source tarball from here and installed it.

Then ghc 7.8.3 had old version of cabal so, have to unregister it from ghc 7.8.3 using ghc unregister Cabal .

Then run bootstrap.sh from cabal-install-1.20 folder and got cabal-install 1.20 successfully.



来源:https://stackoverflow.com/questions/27102858/cabal-install-cabal-install-errors-out-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!