我首先尝试安装Hlint。 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
然后我尝试安装ghc-mod,因为我读到hlint是该包的依赖项(?)。认为它可以解决问题。所以我做了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
所以我的包old-time-1.1.0.3
周围似乎是同样的问题。
答案 0 :(得分:4)
了解失败的最佳方法是浏览每个失败的软件包并依次安装它们。
我遇到问题var data = ["2951", "3", "511", "2737", "3", "502", "2737", "3", "502", "2732"],
gatewayID = [...new Set(data.reduce((p,c,i) => !(i%3) ? p.concat(c) : p, []))]
console.log(gatewayID)
出现在haskell-src-exts
,当我尝试hlint
时cabal install haskell-src-exts
未正确安装。
答案 1 :(得分:3)
有许多变量可以解释正在发生的事情,包括cabal-install
和ghc
版本。如果您在问题中包含cabal --version
和ghc --version
输出,那将非常有用。
说:我建议使用Stack尝试安装。安装Stack后(在POSIX系统上,通常足以运行curl -sSL https://get.haskellstack.org/ | sh
),您可以使用stack --resolver lts-6.16 --install-ghc --no-system-ghc install hlint
进行安装。
答案 2 :(得分:0)
您使用的是Windows还是Linux? ghc --version
说什么?那么ghc-pkg old-time
呢?我建议您尝试直接运行cabal install old-time
,这应该直接重现错误。
答案 3 :(得分:0)
OP解决方案。
修改您的阴谋配置文件(您可以通过运行“ 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