Sunday, November 21, 2010

Solution for sudo: port: command not found

I knew that there are many out there who encounter the same problem as me. I've seen galore of post in the forum but most of them are left with no answer. Sometimes the answer is too complicated to understand. So here is one simple solution for you who is searching for one.. I don't know whether it will works for you or not but at least it works for me.

I got this problem when i first install macports in my macbook. I'm using OS X10.6.3 (Snow leopard) After the installation, I tried to run this command:
   sudo port -v selfupdate

but I got this output:
   sudo: port: command not found

My macbook doesn't recognize any of my sudo command. I did some research on the internet and found a solution that works for me.

Add these 3 lines to your .bash_profile. If you don't have that file, you should have .profile file. To open the file, you should run this line on your terminal.
open .profile
Then add these lines to the file and save it.
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info

After that r-esource the file and you're done.
source .profile

Happy trying!!!



Journey 2 Millions Copyright © 2008 Black Brown Pop Template by Ipiet's Blogger Template