简体   繁体   English

当我尝试安装hlint时,我得到了关于old-time-1.1.0.3的错误

[英]When I try to install hlint I get errors surrounding old-time-1.1.0.3

I first tried to install Hlint. 我首先尝试安装Hlint。 cabal install hlint but then I got the error: cabal install hlint然后我得到了错误:

cabal: Error: some packages failed to install:
cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.18.2 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.37 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77

Then I tried to install ghc-mod since I read that hlint is a dependency of that package(?). 然后我尝试安装ghc-mod,因为我读到hlint是该包的依赖项(?)。 Thinking that it might resolve the problem. 认为它可以解决问题。 So i did cabal install ghc-mod which gave me the error. 所以我做了cabal install ghc-mod ,这给了我错误。

cabal: Error: some packages failed to install:
cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install.
ghc-mod-5.6.0.0 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.17.1 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.35 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77

So it seems to be the same problem, around my the package old-time-1.1.0.3 . 所以它似乎是同样的问题,围绕我的包old-time-1.1.0.3

The best way to know where it fails is to go through each failed package and install them one after the other. 知道失败的最佳方法是遍历每个失败的包并一个接一个地安装它们。

I had issue with haskell-src-exts in which showed up in hlint and when I tried to cabal install haskell-src-exts it was happy that wasn't properly installed. 我有问题haskell-src-exts hlint出现在hlint ,当我尝试cabal install haskell-src-exts hlint时很happy没有正确安装。

There are lots of variables that could be at play to explain what's going on, including cabal-install and ghc versions. 有很多变量可以解释发生了什么,包括cabal-installghc版本。 It would be useful if you included the cabal --version and ghc --version output in your question. 如果你在你的问题中包含cabal --versionghc --version输出会很有用。

That said: I'd recommend trying out the installation using Stack . 那说:我建议使用Stack尝试安装。 Once you have Stack installed (on POSIX systems, usually sufficient to run curl -sSL https://get.haskellstack.org/ | sh ), you can install with stack --resolver lts-6.16 --install-ghc --no-system-ghc install hlint . 一旦你安装了堆栈(在POSIX系统上,通常足以运行curl -sSL https://get.haskellstack.org/ | sh ),你可以用stack --resolver lts-6.16 --install-ghc --no-system-ghc install hlint安装stack --resolver lts-6.16 --install-ghc --no-system-ghc install hlint

Are you on Windows or Linux? 你在Windows或Linux上吗? What does ghc --version say? ghc --version说什么? What about ghc-pkg old-time ? ghc-pkg old-time怎么样? I recommend trying to run cabal install old-time directly, which should reproduce the error directly. 我建议尝试直接运行cabal install old-time ,这应该直接重现错误。

Solution by OP. OP解决方案。

Modify your cabal config file (you can verify the location by running "cabal user-config init") to contain the following lines: 修改您的cabal配置文件(您可以通过运行“cabal user-config init”来验证位置)以包含以下行:

extra-prog-path: C:\Program Files\Haskell Platform\8.0.1\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\include

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

相关问题 我可以在不使用 cabal 的情况下通过堆栈安装 hlint - can I install hlint by stack without using cabal 当我尝试在WSL上安装Haskell平台时会抛出大量错误 - Haskell-platform throws a ton of errors when I try to install it on WSL 尝试返回列表时出现错误 - errors when I try to return a list 每当我尝试安装某些东西时,都会抛出堆栈错误 - Stack throwing errors whenever I try to install something Haskell`hlint`,如何添加错误缩进,尾随空格等提示? - Haskell `hlint`, how can I add hint for wrong indentation, trailing spaces and etc? 如何使用注释自定义HLint并将我的Haskell包标记为安全? - How can I use annotations to customize HLint and mark my Haskell package as Safe? 尝试推导eq时出现错误。 我怎样才能解决这个问题? - I get an error when i try deriving eq. How can i fix this? 当我尝试使用 ghci 加载此 Haskell 代码时,为什么会出现错误? - Why do i get an Error when i Try to load this Haskell-Code with ghci? 每当我尝试在 Cabal 上安装新软件包时,它都会尝试安装以前失败的安装但失败 - Whenever I try to install a new package on Cabal, it tries and fails to install a previously failed install 错误:当我尝试获取列表元素的符号时,实例:Num(a-> b) - Error: Instance : Num (a -> b) when I try to get the sign of the elements of a list
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM