问题
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