繁体   English   中英

堆栈安装ghc-mod失败,OSX 10.13.4上存在依赖冲突

[英]stack install ghc-mod fails with dependencies conflicts on OSX 10.13.4

当我尝试通过堆栈安装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。 您可以尝试将Stack解析器更改为lts-8.24或nightly-2017-06-28(请参阅ghc-mod的Stackage页面上列出的快照)。

更简单,这对我stack install ghc-mod --resolver lts-8.24stack install ghc-mod --resolver lts-8.24

输入命令行:

stack install ghc-mod --resolver lts-8.24

它确实有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM