Solution for sudo: port: command not found (Mac)

Saturday, January 1, 2011

 This is one of the solution for this famous error message .. 


sudo: port: command not found
I encountered this problem when I first install macports into my macbook. FYI, I'm running on OS   X10.6.3 (Snow Leopard). After the installation I tried to run this code but it return the error as above.

sudo port -v selfupdate
I did some googling and found one solution that works for me.
Add these lines to your .bash_profile. If you don't have that file,  you should have .profile file. So, just open the files and add these lines.
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
Save that file and re-source the file from your terminal. 
source .profile
And you're done...

0 comments:

Post a Comment

Technology blogs Blog Directory

  © Blogger template Noblarum by Ourblogtemplates.com 2009

Back to TOP