Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.