1

I was following this tutorial on how to install cabal on linux.

So far, I successfully installed cabal-install from apt:

sudo apt install cabal-install

However, at the step where they upgrade cabal with cabal itself, I encounter this error:

$ 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.

I couldn't find exactly

Cabal-3.0.0.0/Distribution/Parsec.hs:134:0:

(line 9 of the log) on google.

I tried to install only cabal-install and Cabal separately with the cabal cli, but I got the exact same error each time.

How do I work around this error and successfully update cabal?

ljleb
  • 13
  • 3

0 Answers0