haskellcabalcabal-install

cabal update never completes


On my CentOS 7 I have installed cabal-install thus:

yum install cabal-install

This was successful.

When I try to use it to install something it reports (not unexpectedly):-

You may need to run 'cabal update' to get the latest list of available packages.

So I try to do this.

cabal update

This takes hours, but does finally complete. At the end it reports:-

Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install

So I try to do exactly that, to which it reports:-

Resolving dependencies...
cabal: internal error when reading packing index: failed to parse .cabal
fileThe package index or index cache is probably corrupt. Running cabal update
might fix it.

Surely cabal update is what literally just created it?

Anyway, I tried it again, left it for hours to finish, it said:-

Downloading the latest package list from hackage.haskell.org

and then everything was just the same as before. It hadn't fixed anything.

What does one do to diagnose and fix this? All I want is to install shelltestrunner!


Solution

  • I would remove all the Haskell related yum packages and just use GHCup to install and update cabal.

    GHCup has become the standard way to set up Haskell tooling for development. Packages from Linux distributions tend to not be supported very well for the use case of actual Haskell development.