OSX 10.13.4 上堆栈安装 ghc-mod 因依赖项冲突而失败

2023-11-21

当我尝试通过堆栈安装 ghc-mod 时,我最终遇到了这些依赖项冲突

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for ghc-mod-5.8.0.0:
    Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25  (latest matching version is 1.24.2.0)
    base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10  (latest matching version is 4.9.1.0)
    cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified version  (latest matching version is 0.7.3.0)
    extra-1.6.8 from stack configuration does not match <1.6 && >=1.4  (latest matching version is 1.5.3)
    ghc-8.2.2 from stack configuration does not match >=7.6 && <8.2
    haskell-src-exts-1.20.2 from stack configuration does not match <1.20 && >=1.18  (latest matching version is 1.19.1)
    hlint-2.1.6 from stack configuration does not match <2.1 && >=2.0.8  (latest matching version is 2.0.15)
    monad-journal-0.8.1 from stack configuration does not match <0.8 && >=0.4  (latest matching version is 0.7.2)
    optparse-applicative-0.14.2.0 from stack configuration does not match >=0.13.0.0 && <0.14  (latest matching version is 0.13.2.0)
needed since ghc-mod is a build target.

Some different approaches to resolving this:

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
    errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps in /Users/mo/.stack/global-project/stack.yaml:

- Cabal-1.24.2.0
- base-4.9.1.0
- cabal-helper-0.7.3.0
- extra-1.5.3
- haskell-src-exts-1.19.1
- hlint-2.0.15
- monad-journal-0.7.2
- optparse-applicative-0.13.2.0

如果我尝试像这样添加建议的额外部门

extra-deps:
- Cabal-1.24.2.0
- base-4.9.1.0
- cabal-helper-0.7.3.0
- extra-1.5.3
- haskell-src-exts-1.19.1
- hlint-2.0.15
- monad-journal-0.7.2
- optparse-applicative-0.13.2.0
- process-1.4.3.0
- either-4.4.1.1
- free-4.12.4

我最终有一个这样的循环

    Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for ghc-mod-5.8.0.0:
    base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10  (latest matching version is 4.9.1.0)
    ghc-8.2.2 from stack configuration does not match >=7.6 && <8.2
needed since ghc-mod is a build target.

In the dependencies for haskell-src-exts-util-0.2.3:
    haskell-src-exts-1.19.1 from stack configuration does not match >=1.20.0  (latest matching version is 1.20.2)
needed due to ghc-mod-5.8.0.0 -> haskell-src-exts-util-0.2.3

In the dependencies for hlint-2.0.15:
    haskell-src-exts-1.19.1 from stack configuration does not match >=1.20 && <1.21  (latest matching version is 1.20.2)
needed due to ghc-mod-5.8.0.0 -> hlint-2.0.15

Some different approaches to resolving this:

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
    errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps in /Users/mo/.stack/global-project/stack.yaml:

- base-4.9.1.0
- haskell-src-exts-1.20.2

如果我把 - haskell-src-exts-1.20.2 他们要求我放 - haskell-src-exts-1.19.1 回来,反之亦然,我不知道如何处理这种依赖冲突,而且我也尝试运行堆栈解析器,但它没有让我到任何地方


问题是 ghc-mod 不支持较新版本的 GHC,我相信最后支持的版本是 GHC 8.0。您可以尝试将堆栈解析器更改为 lts-8.24 或 nightly-2017-06-28(请参阅上列出的快照)ghc-mod 的 Stackage 页面).

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

OSX 10.13.4 上堆栈安装 ghc-mod 因依赖项冲突而失败 的相关文章

  • 绑定变量时 Haskell 中的无限循环

    下面的 Haskell 代码不会终止 有人可以解释一下为什么吗 谢谢 f let x 10 in let x x x in x 我认为解释器首先绑定 x 10 然后将 x x 计算为 100 并绑定 x 100 环境变为 x 100 那么整
  • 无法通过 cabal 安装“System.Random”

    我尝试通过 Cabal 通过 Powershell 和 Git Bash 安装 System Random 得到这个结果 PS C Users xxx gt cabal install random Resolving dependenci
  • 计算/获取分层数据的“级别”

    好吧 我真的不知道这是否是正确的标题 但我不知道如何称呼它 我的问题是关于我的作业 我现在已经工作了几个小时 主题是 函数式数据结构 我有点陷入困境 我不知道如何继续 所以我需要编写一个具有以下签名的函数 data Heap e t Hea
  • 算法 - 如何有效删除列表中的重复元素?

    有一个list L 它包含以下元素任意类型each 如何有效删除此类列表中的所有重复元素 必须保留订单 只需要一个算法 因此不允许导入任何外部库 相关问题 在Python中 从列表中删除重复项以使所有元素都是唯一的最快算法是什么在维持秩序的
  • 如何向 Scotty 中间件添加基本身份验证?

    我目前正在制作 Scotty API 但找不到任何 basicAuth 实现的示例 Wai Middleware HttpAuth 具体来说 我想将基本身份验证标头 用户 通行证 添加到我的某些端点 即以 admin 开头的端点 我已经设置
  • 如何、为什么以及何时使用“.Internal”模块模式?

    我在上面看到了几个包裹hackage http hackage haskell org packages archive pkg list html其中包含模块名称 Internal作为他们的姓氏组成部分 例如Data ByteString
  • 为什么haskell中的递归列表这么慢?

    我对 Haskell 很陌生 我在 Haskell 中定义了一个函数 febs Integral a gt a gt a febs n n lt 0 0 n 1 1 n 2 1 otherwise febs n 1 febs n 2 但是
  • 如何将只缓存某些内容的字段添加到ADT?

    我经常需要向 ADT 添加字段 仅记住一些冗余信息 但我还没有完全弄清楚如何又好又高效地做到这一点 说明问题的最好方法是举个例子 假设我们正在使用无类型 lambda 项 type VSym String data Lambda Var V
  • GHC 是否使用存在类型的动态调度?

    下面的代码是否使用了 C 或 Java 中所理解的动态调度 据我了解 在最后一行 编译器不可能在编译时知道要调用哪个 实现 但代码会编译并产生正确的结果 有人可以解释一下 这背后有什么样的实现 例如 vptr 吗 LANGUAGE Exis
  • 对元组列表进行排序的函数 - Haskell

    抱歉 这个简单的问题只是我对 haskell 非常陌生 我正在尝试编写一个函数 order 它将对另一个函数 Frequency 生成的元组列表进行排序 频率计算列表中不同元素的数量 a给出一个这样的结果 比如 gt 频率 aabbbccc
  • Haskell 错误处理方法

    毫无疑问 Haskell 中有多种机制来处理错误并正确处理它们 错误单子 要么 也许 异常等 那么为什么用其他语言编写容易出现异常的代码比用 Haskell 感觉更简单呢 假设我想编写一个命令行工具来处理命令行上传递的文件 我想 验证提供的
  • 带有查询参数的渲染 url

    无法找到简单问题的解决方案 答案应该是显而易见的 如何在 hamlet 模板中使用查询参数渲染 url I e ItemsR 将生成http localhost 3000 items我如何生成类似的东西http localhost 3000
  • 我应该使用什么递归方案来重复有效的操作,直到其结果符合某些标准?

    也就是说 我要问的是一个循环 effectful Int gt IO Int effectful n do putStrLn Effect show n return n condition 3 final Int gt IO final
  • 什么是阴谋地狱?

    在阅读有关 阴谋地狱 的内容时 我有点困惑 因为这个词的含义太多了 我猜最初 Cabal Hell 指的是钻石依赖问题 该问题是通过限制构建计划在每个构建计划中只有任何包的单个版本来解决的 一个包的两个不同版本不能存在于单个构建计划中 正如
  • 使用 Haskell 将函数注入到 Java .class 文件中

    我使用 Haskell 编写了一个 Java 字节码解析器 它工作得很好 然而下一步让我完全难住了 我的 Haskell 程序需要修改 class 文件 以便在执行时 Java 程序打印 输入 此处的方法名称 在执行方法之前 并且 退出 此
  • Haskell 排列库函数 - 请澄清一下?

    这是代码permutationsHaskell 中的函数Data List module permutations a gt a permutations xs0 xs0 perms xs0 where perms perms t ts i
  • 如何避免编写这种类型的 Haskell 样板代码

    我经常遇到这种情况 这很烦人 假设我有一个 sum 类型 它可以保存一个实例x或一堆其他无关的事情x data Foo x X x Y Int Z String other constructors not involving x 要声明
  • 为什么 Haskell 中的点是从右向左排列的?

    如果我们有两个函数 f and g 然后在哈斯克尔h f g相当于h x f g x IE 这些函数从右到左应用于输入 有什么根本原因可以解释为什么它是从右到左 而不是从左到右吗 IE 他们为什么不做h f g相当于h x g f x 反而
  • Haskell:从后面访问列表

    今天我开始学习Haskell 我对函数式语言有点陌生 而且我非常喜欢 Haskell 然而 我有一个关于它的设计的问题困扰着我 从我到目前为止的理解来看 访问列表后面的元素似乎比访问前面的元素要复杂得多 类似于xs x where xs a
  • 用纯函数式语言保持状态

    我正在尝试弄清楚如何执行以下操作 假设您正在开发直流电机的控制器 您希望让它以用户设置的特定速度旋转 def set point ref sp 90 while true let curr read speed controller set

随机推荐