0

I recently installed ghc 7.8, but now I want to go back to ghc 7.4

I installed ghc 7.8 via a binary package, but I didn't uninstall it correctly. When I run ghc, ghci or runhaskell, I get

/usr/local/bin/ghc: line 9: /usr/local/lib/ghc-7.8.2/bin/ghc: No such file or directory

How do I change all these applications to point to the correct version (7.4) that's here?

/usr/bin/ghc-7.4.1
Geert
  • 103

1 Answers1

0

You can update the references using update-alternatives.

For example:

sudo update-alternatives --set ghc /usr/bin/ghc-7.4.1/ghc
sudo update-alternatives --set ghci /usr/bin/ghc-7.4.1/ghci
sudo update-alternatives --set runhaskell /usr/bin/ghc-7.4.1/runhaskell

More information.

Louis Matthijssen
  • 11,885
  • 6
  • 44
  • 50