【问题标题】:cabal install dependency error: "base-* was excluded because of the top level dependency base -any"cabal 安装依赖项错误:“base-* 由于顶级依赖项 base -any 而被排除”
【发布时间】:2011-09-11 01:21:06
【问题描述】:

这是完整的错误:

$ cabal install hakyll
Resolving dependencies...
cabal: cannot configure snap-server-0.5.3.1. It requires base >=4.3 && <5
For the dependency on base >=4.3 && <5 there are these packages: base-4.3.0.0,
base-4.3.1.0 and base-4.4.0.0. However none of them are available.
base-4.3.0.0 was excluded because of the top level dependency base -any
base-4.3.1.0 was excluded because of the top level dependency base -any
base-4.4.0.0 was excluded because of the top level dependency base -any
$

如何排除 base-* 的版本,因为某些规则似乎表明任何版本都可以?

【问题讨论】:

  • 我想我以前打过这个。只是对我读到的错误消息的解释:顶级包可能坚持它适用于 any 版本的 base,而子包增加了限制,违反了该保证。也许最后三行具有误导性,是由其他错误报告代码生成的。
  • 另外,cabal-dev 让我更加幸运。在这里查看我的一个相关问题/答案:stackoverflow.com/questions/6920967/…
  • 你安装的是什么版本的GHC?看起来 snap 需要更高版本的 GHC,因为您无法安装与 GHC 随附的版本不同的 base 版本。

标签: haskell dependencies cabal


【解决方案1】:

每次我遇到这个问题,都是因为我做了以下所有事情:

  1. 从 Hackage 下载了一个依赖过期的包。
  2. 更新了依赖项并观察到它构建良好(或花费时间修复发生的任何错误)。
  3. 使用新的依赖项运行 cabal install
  4. 没有更新版本号。

最后一个是真正的踢球者。 cabal install 会假设,如果它知道来自 Hackage 的包的版本/依赖项对,则该对是规范的。如果您希望它了解更新的依赖项,请在安装之前更改包的版本号。

您需要检查是否已为您手动安装的任何 hakyll 依赖项正确执行此操作。

【讨论】:

    【解决方案2】:

    遇到了同样的问题。解决了。

    这是一个干净的 haskell 安装。但它是从具有旧版本的 linux 风格(在本例中为 ubuntu)包管理器中进行的干净的 haskell 安装。

    必须删除旧软件包并下载源代码并构建和安装它。

    获取最新平台来源:
    http://hackage.haskell.org/platform/linux.html

    获取平台所需的 ghc 源。 http://haskell.org/ghc/download_ghc_7_0_3#distros

    执行此操作的示例: http://sporkcode.wordpress.com/2009/07/11/installing-the-haskell-platform-in-ubuntu/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-24
      • 2019-02-04
      • 2016-08-21
      • 1970-01-01
      • 2015-01-24
      • 1970-01-01
      相关资源
      最近更新 更多