Cabal:安装和更新软件包时出现问题

我试图使用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的新手)

0
投票

问题是我使用的是ghc的过时版本,重新安装了所有内容以进行更新,现在它可以工作了。