PATH not searched properly for gcc version
ryandesign at macports.org
Tue Jul 3 19:15:09 UTC 2018
On Jul 3, 2018, at 12:40, Rainer Müller wrote:
> On 2018-07-03 19:02, Turner, Adrian Keith wrote:
>> Also, interesting are the results of which and whereis:
>> which gcc
>> whereis gcc
> That is normal, whereis does not respect PATH.
>> How do I make my system find the correct version of gcc without
>> specifying the full path?
> Your shell has probably cached the location of the gcc binary from
> earlier before you created the symlink with 'port select'. Just open a
> new terminal window or execute 'hash -r' to clear the cache.
Adrian didn't say he had used 'port select'. If he hasn't, that's the first thing he should do, if he wants to be able to use gcc 7.3 as "gcc".
More information about the macports-users