【发布时间】:2020-03-30 14:20:14
【问题描述】:
我尝试使用 cabal 安装 threadscope 包,但收到有关 cabal 过时的错误:
cabal: Error: some packages failed to install:
cairo-0.13.8.0 failed during the configure step. The exception was:
user error (The package 'cairo' requires Cabal library version -any && >=1.24
but no suitable version is installed.)
gio-0.13.8.0 depends on glib-0.13.8.0 which failed to install.
glib-0.13.8.0 failed during the configure step. The exception was:
user error (The package 'glib' requires Cabal library version -any && >=1.24
but no suitable version is installed.)
gtk-0.14.7 depends on glib-0.13.8.0 which failed to install.
pango-0.13.8.0 depends on glib-0.13.8.0 which failed to install.
threadscope-0.2.11.1 depends on glib-0.13.8.0 which failed to install.
但是当我尝试 cabal install cabal-install 我得到:
Resolving dependencies...
Configuring Cabal-3.0.0.0...
Failed to install Cabal-3.0.0.0
Build log ( /home/ignacio/.cabal/logs/Cabal-3.0.0.0.log ):
cabal: Error: some packages failed to install:
Cabal-3.0.0.0 failed during the configure step. The exception was:
user error ('/usr/bin/ghc' exited with an error:
/tmp/cabal-tmp-19678/Cabal-3.0.0.0/Distribution/Parsec.hs:134:0:
error: missing binary operator before token "("
#if !(MIN_VERSION_base(4,13,0))
^
)
cabal-install-3.0.0.0 depends on Cabal-3.0.0.0 which failed to install.
hackage-security-0.5.3.0 depends on Cabal-3.0.0.0 which failed to install.
我在 ubuntu 16.04
cabal 安装版本 1.22.6.0 使用 Cabal 库的 1.22.5.0 版本
如果您能提供任何帮助,我将不胜感激。 (对不起,如果我写了一些奇怪的东西,英语不是我的母语,我对 ubuntu 有点陌生)
【问题讨论】:
-
您使用的是哪个 GHC 版本? (使用
ghc --version查看。) -
就是这样,谢谢你我更新了 ghc 并重新安装了 cabal,现在它可以工作了
-
不客气。我添加了一个答案来写下问题的可能根源。
标签: haskell cabal cabal-install