user3625479
user3625479

Reputation: 27

After installing a new GHC version, why does ghc --version still shows the old version?

I've finally installed ghc 7.8.2, but when I type ghc --version onto my Terminal it still says 7.6.3 why is this? I do not want 7.6.3 anymore?

Upvotes: 1

Views: 514

Answers (1)

leftaroundabout
leftaroundabout

Reputation: 120711

The executables you'll normally run are actually just symlinks

~$ which ghc
/usr/local/bin/ghc
~$ which ghc | xargs file
/usr/local/bin/ghc: symbolic link to `/usr/local/haskell/bin/ghc-7.8.2'

In your case, it's probably the old distro-installed 7.6.3 instead. Remove/rename that and put the correct ghc symlink in place (somewhere that's in you PATH, it needn't be /usr/local/bin), pointing to whereever you've installed the new GHC.

Upvotes: 3

Related Questions