我正在关注这关于如何cabal
在 Linux 上安装的教程。
到目前为止,我已成功cabal-install
安装apt
:
sudo apt install cabal-install
cabal
然而,在他们自行升级的步骤中cabal
,我遇到了这个错误:
$ cabal install cabal-install Cabal
Resolving dependencies...
Configuring Cabal-3.0.0.0...
Failed to install Cabal-3.0.0.0
Build log ( /home/abstrack/.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-25404/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.
我没能准确找到
Cabal-3.0.0.0/Distribution/Parsec.hs:134:0:
(日志第 9 行)在 google 上。
我尝试仅使用 CLI 进行单独cabal-install
安装,但每次都会出现完全相同的错误。Cabal
cabal
如何解决此错误并成功更新cabal
?