【问题标题】:cabal install cabal-install errors out on linuxcabal install cabal-在linux上安装错误
【发布时间】:2015-01-22 01:09:44
【问题描述】:

我正在使用 linux (centos 6.6)。当我尝试运行 cabal install cabal-install 命令时出现以下错误

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

注意:caball-install 版本 0.10.2 使用 Cabal 库的 1.10.2.0 版
GHC 版本 7.0.4
haskell-platform-2011.4.0.0-6.el6.x86_64

如何解决。请帮忙!

【问题讨论】:

  • 那些版本很古老。您可能想从头开始重新安装 cabal/ghc。
  • 你能给我一个下载最新版本的链接吗?如果我尝试下载这些,使用 yum install 命令只会得到旧版本。我应该更新存储库还是应该如何解决这些依赖问题?
  • @Michael-当尝试从您提供的链接更新 cabal 时出现以下错误:No instance for (NFData Version) arising from a use of rnf' 可能的解决方法:在 @ 的第二个参数中为(NFData 版本)添加实例声明987654325@rnf version' 在表达式中:rnf name seq rnf version 在rnf': rnf (PackageIdentifier name version) = rnf name seq` rnf version 的等式中 cabal-install 引导期间出错:编译安装脚本失败。`

标签: haskell cabal cabal-install


【解决方案1】:

这个问题是因为旧版本的 ghc-7.0.4。我从 here 下载了 ghc 7.8.3 源码包并安装了它。

然后 ghc 7.8.3 有旧版本的 cabal 所以,必须使用从 ghc 7.8.3 注销它 ghc unregister Cabal.

然后从 cabal-install-1.20 文件夹运行 bootstrap.sh 并成功获得 cabal-install 1.20。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-04
    相关资源
    最近更新 更多