I am trying to install MacPorts on my OS 10.5.8. I followed the instructions for the installation of the MacPorts-2.1.3.tar.bz2 package, and after adding the following lines to my .bash_profile
:
PATH=$PATH:opt/local/bin
export PATH
PATH=$PATH:opt/local/sbin
export PATH
I still got the following error when I tried to execute the the sudo port -v selfupdate
command:
sudo: port: command not found
After investigating a similar post about the same error, I still am confused. Is it because I have my new path statements in the my .bash_profile
and not in .profile
or is it also because I forget the MANPATH
environment variable?
Thanks for your help!
You are missing a leading backslash: /opt/local
- not opt/local
The automated annotations from a MacPorts install always prepended the following directories for me: export PATH=/opt/local/bin:/opt/local/sbin:$PATH
, in .profile
.
ie, the port binaries should take precedence over the system, or whatever else you have in your current PATH
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.