首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装hip时,堆栈不能解析依赖项

安装hip时,堆栈不能解析依赖项
EN

Stack Overflow用户
提问于 2019-01-22 03:56:01
回答 2查看 220关注 0票数 0

我想使用堆栈从https://hackage.haskell.org/package/hip安装Haskell库hip。这不起作用,因为堆栈似乎无法安装依赖项。

我有curl -sSL https://get.haskellstack.org/ | sh新安装的堆栈,stack --version给了我

Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1

我已经尝试了几种方法,比如另一个解析器,重新安装不同版本的堆栈,ghc或cabal。

我尝试过stack new test,在test文件夹中,我编写了stack install hip

我得到了以下错误:

代码语言:javascript
复制
Error: While constructing the build plan, the following exceptions were
encountered:

In the dependencies for hip-1.5.3.0:
    Chart must match >=1.5, but the stack configuration has no specified
          version  (latest matching version is 1.9)
    Chart-diagrams must match >=1.5, but the stack configuration has no
                   specified version  (latest matching version is 1.9)
needed since hip 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 /home/jarek/Desktop/test/stack.yaml:

Chart-1.9@sha256:f41568b6b3704f66c2ec163295b430ab7d798f91de426c2d5aba747d1135cd9b
Chart-diagrams-1.9@sha256:cdd0c22d730e507f9644e690833096ee127302b5ff5e1571f6def419160a2642

Plan construction failed.

我希望是这样的:

代码语言:javascript
复制
Building dependencies...
Installing Chart-1.9
...
...
...
hip successfully installed.

如果我没有提供您帮助我解决问题所需的所有信息,请告诉我。

EN

回答 2

Stack Overflow用户

发布于 2019-01-22 04:05:09

为什么不按照stack的建议去做呢?

代码语言:javascript
复制
Recommended action: try adding the following to your extra-deps
in /home/jarek/Desktop/test/stack.yaml:

Chart-1.9@sha256:f41568b6b3704f66c2ec163295b430ab7d798f91de426c2d5aba747d1135cd9b
Chart-diagrams-1.9@sha256:cdd0c22d730e507f9644e690833096ee127302b5ff5e1571f6def419160a

这是实现你目标的最简单的方法。

更新: lts-10.10是包含hip的最新解析器。如果您将stack.yaml更新为使用lts-10.10并将hip添加到.cabal文件中,那么您应该可以正常工作了。

票数 0
EN

Stack Overflow用户

发布于 2019-01-22 04:21:39

使用解析器lts-7.5进行安装。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54296951

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档