macports gcc select error trying to exec i686-apple-darwin11-llvm-gcc-4.2
Most likely it is because bash has gcc
hashed.
Run
$ hash
to see which commands are hashed. If /usr/bin/gcc appears on the list, run
$ hash gcc
to rehash gcc
. Afterwards you should see /opt/local/bin/gcc if you run hash
, and running gcc
should run the macports version – providing of course that you have selected it.
/B2S
Edit: For zsh users, run $ rehash
to refresh the hash in its entirety.