bash reports "port command not found"

Kevin Walzer kw at codebykevin.com
Fri Sep 19 08:08:14 PDT 2008


Richard Rucker wrote:

>>> Dick
>>
>> What does "echo $PATH" show in Terminal?
> 
> Last login: Fri Sep 19 10:55:20 on ttys000
> Carmel-4:~ RAR$ port list
> -bash: port: command not found
> Carmel-4:~ RAR$ echo $PATH
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
> Carmel-4:~ RAR$

OK, I think this is a bug in the MacPorts 1.6 installer--I've seen it 
reported here, but I am not sure where it's documented (apart from the 
list archives).

Run this command in Terminal:

  open -e .profile

This will open the .profile file in Text Editor.

Then, add this to the file:

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

Close the file, open up a new Terminal window, and run "echo $PATH" 
again. It should show /opt/local/bin on your $PATH.

As an alternative, you can always run the command "/opt/local/bin/port" 
in Terminal with the appropriate parameters, such as /opt/local/bin/port 
list. Adding the "/opt/local/bin" bits to $PATH just reduces the amount 
of typing you have to do.

--Kevin

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


More information about the macports-users mailing list