gpt4 book ai didi

Haskell cabal 安装错误

转载 作者:行者123 更新时间:2023-12-02 06:26:00 25 4
gpt4 key购买 nike

我在 cabal-install 方面遇到很多问题:
1:每次我执行cabal update时,它都会告诉我执行cabal install cabal-install,所以我这样做了,然后当我执行cabal update时code> 再次,它说的是同样的事情。

2:当我尝试从 hackage 安装 ghc-mod 时,出现以下错误:

[username@arch ~]$ cabal install ghc-mod
In order, the following will be installed:
haskell-src-exts-1.14.0 (reinstall) changes: pretty-1.1.1.1 -> 1.1.1.0
hlint-1.8.55 (reinstall)
ghc-mod-3.1.4
setup: The program happy version >=1.17 is required but it could not be found.
ghc-mod-3.1.4 depends on haskell-src-exts-1.14.0 which failed to install.
haskell-src-exts-1.14.0 failed during the configure step.
hlint-1.8.55 depends on haskell-src-exts-1.14.0 which failed to install.

所以问题是需要程序happy版本>=1.17,但找不到。,所以我使用cabal安装了happy 1.19.2安装 happy 没有问题。

我再次尝试了cabal install ghc-mod,同样的错误,所以我尝试了cabal install haskell-src-exts --reinstall --force-reinstalls。它给了我以下错误:

[username@arch ~]$ cabal install haskell-src-exts --reinstall --force-reinstalls
Configuring haskell-src-exts-1.14.0...
setup: The program happy version >=1.17 is required but it could not be found.
Failed to install haskell-src-exts-1.14.0
cabal: Error: some packages failed to install:
haskell-src-exts-1.14.0 failed during the configure step. The exception was:
ExitFailure 1

基本上需要程序happy版本>=1.17,但找不到。。这么高兴又出问题了?

我还尝试从 hackage 下载 tar.gz 文件并在.cabal 文件,同样修改了.cabal 文件忽略依赖关系,仍然失败。

最佳答案

cabal install 将可执行文件放置在 ~/.cabal/bin 中。

如果将其添加到路径中,您将能够使用 cabal 安装的新可执行文件:

$ PATH=$HOME/.cabal/bin:$PATH

关于Haskell cabal 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20460646/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com