Cannot install any packages after upgrading to GHC 8.0.1

Hi, I update my GHC to 8.0.1 and failed to install any packages since then. If I use cabal, I got 'installed package info from too old version of Cabal (key field does not match id field)' for every package. If I use Setup.hs, I got 'Configuring Cabal-1.24.0.0... Setup.hs: ghc-pkg dump failed'. What should I do? Googling did not get me an answer.

I'd guess that you've got an older version of cabal-install on your system that doesn't support GHC 8. You can test that with `cabal --version` and see if it's 1.24 or later. My recommendation would be to try out Stack. There are new easier installation instructions at https://haskell-lang.org/get-started, and recent Stackage Nightly snapshots are all using GHC 8.0.1. On Mon, Jul 11, 2016 at 10:49 AM, Magicloud Magiclouds < magicloud.magiclouds@gmail.com> wrote:
Hi, I update my GHC to 8.0.1 and failed to install any packages since then. If I use cabal, I got 'installed package info from too old version of Cabal (key field does not match id field)' for every package. If I use Setup.hs, I got 'Configuring Cabal-1.24.0.0... Setup.hs: ghc-pkg dump failed'. What should I do? Googling did not get me an answer.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On July 11, 2016 at 3:49:46 AM, Magicloud Magiclouds (magicloud.magiclouds@gmail.com) wrote:
Hi, I update my GHC to 8.0.1 and failed to install any packages since then. If I use cabal, I got 'installed package info from too old version of Cabal (key field does not match id field)' for every package. If I use Setup.hs, I got 'Configuring Cabal-1.24.0.0... Setup.hs: ghc-pkg dump failed'. What should I do? Googling did not get me an answer.
The former error can occur if your cabal binary is too old. You can download a newer cabal binary from: https://www.haskell.org/cabal/download.html If the latter error persists, then perhaps your ghc-pkg was not updated along with your ghc? —gershom

Yes, you need to upgrade your cabal-install. If you still have an old version of GHC around, you can upgrade using: cabal update cabal install -w /path/to/old/ghc cabal-install Edward Excerpts from Magicloud Magiclouds's message of 2016-07-11 03:49:20 -0400:
Hi, I update my GHC to 8.0.1 and failed to install any packages since then. If I use cabal, I got 'installed package info from too old version of Cabal (key field does not match id field)' for every package. If I use Setup.hs, I got 'Configuring Cabal-1.24.0.0... Setup.hs: ghc-pkg dump failed'. What should I do? Googling did not get me an answer.

Thank you all. Did not know I should update cabal as well.
'ghc-pkg dump' error was just because I forgot to initialize database.
Magicloud Magiclouds
Hi, I update my GHC to 8.0.1 and failed to install any packages since then. If I use cabal, I got 'installed package info from too old version of Cabal (key field does not match id field)' for every package. If I use Setup.hs, I got 'Configuring Cabal-1.24.0.0... Setup.hs: ghc-pkg dump failed'. What should I do? Googling did not get me an answer.
participants (4)
-
Edward Z. Yang
-
Gershom B
-
Magicloud Magiclouds
-
Michael Snoyman