我想使用堆栈从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。
我得到了以下错误:
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.我希望是这样的:
Building dependencies...
Installing Chart-1.9
...
...
...
hip successfully installed.如果我没有提供您帮助我解决问题所需的所有信息,请告诉我。
发布于 2019-01-22 04:05:09
为什么不按照stack的建议去做呢?
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文件中,那么您应该可以正常工作了。
发布于 2019-01-22 04:21:39
使用解析器lts-7.5进行安装。
https://stackoverflow.com/questions/54296951
复制相似问题