I just reinstalled Haskell Platform (here is why) and after reinstalling the Haskell Platform I get:
Drews-MacBook-Pro:Blokus-AI drewgross$ ghc
-bash: /usr/local/bin/ghc: No such file or directory
Any idea why? I suspect that this is something to do with my path or something like that but I haven’t found anything weird yet. I can use ghc directly:
Drews-MacBook-Pro:Blokus-AI drewgross$ /usr/bin/ghc
ghc: no input files
Usage: For basic information, try the `--help' option.
And /usr/bin/ is in my path:
Drews-MacBook-Pro:Blokus-AI drewgross$ echo $PATH
/Users/drewgross/.rvm/gems/ruby-1.9.3-p327/bin:/Users/drewgross/.rvm/gems/ruby-1.9.3-p327@global/bin:/Users/drewgross/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/drewgross/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
what else can I do?
The
bashshell caches paths to commands that you’ve previously used. Usingwhich ghcwon’t show this (because it’s external to the shell and just queries thePATH), buttypeis abash-internal command that will reveal this situation, sotype ghcwill show something likeThe fix is easy. Either start a new shell (where you start from scratch), or clear the cache by saying
hash -r.