sudo: port: command not found

chris (2008-03-08 11:54:51)
659 views
0 replies
According to the macports installation docs, the installer will make the necessary changes to your bash profile to allow the shell to find the new port application once installed. I found this didn't happen when installing macports, so of course the environment couldn't find port:

secondhalf-lm:~ clacy$ sudo port -v selfupdate
sudo: port: command not found

It's easy to get around this just by extending the path in your .bash_profile - The following should do the job:

add the following to ~/.bash_history

export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info

and then re-source the file:

secondhalf-lm:~ clacy$ source .bash_profile 
secondhalf-lm:~ clacy$ sudo port -v selfupdate
Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/
receiving file list ... file has vanished: "/ports/perl/p5-csp/.Portfile.sPwLRn" (in release)
done
.. etc

You now have a working ports installation.

christo
Digg it! Submit to Slashdot Add to Blinklist Del.icio.us Add to Newsvine Add to Technorati Add it to Google Bookmarks Add to Magnolia
reply