gcc44 installs correctly but default gcc is still used

Josie Reinhardt josieziegler at gmail.com
Wed May 23 14:19:19 PDT 2012


export PATH=/opt/local/bin:/opt/local/sbin:$PATH


On Wed, May 23, 2012 at 5:04 PM, Frank Schima
<macsforever2000 at macports.org> wrote:
>
> On May 23, 2012, at 2:57 PM, Josie Reinhardt wrote:
>
>> I changed ~/.profile to:
>>
>> PATH="$PATH:/opt/local/bin/:/opt/local/sbin/"
>> export PATH
>>
>> but something keeps adding /usr/bin, etc back in before /opt/local/bin/
>>
>> $ echo $PATH
>> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin/:/opt/local/sbin/
>>
>> I've tried to find another .profile .bash_profile or .bashrc file that
>> could be overriding but I can't find it?
>
> Indeed it is exactly what you set. The suggested path to use according to the guide [1] is as follows:
>
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
>
>
> Cheers!
> Frank
>
> [1] <https://trac.macports.org/wiki/InstallingMacPorts>
>
>

Frank and Jeremy, thanks for so cheerfully dealing with newby me.  I
think it's working now:

$ which gcc
/opt/local/bin/gcc

But for whatever reason the PATH I'm getting back is _not_ what I set
in ~/.profile:

Here's the entirety of .profile (now that I've cleaned it up):
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

But when I open a new terminal and echo path I get
$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Still at least now /opt/local/bin are in front...  but where did the
other stuff come from???

Josie


More information about the macports-users mailing list