[p4] P4 command line client not working

Patrick M. Slattery patrickmslattery at mac.com
Wed Aug 29 21:16:30 PDT 2007

The Perforce docs are orientated more towards vanilla Unix, while OS  
X is very close there are a few minor differences.
At a terminal (bash) prompt type
This will display all of your user variables, the default path  
variable in OS X 10.4 is typically:
Depending on where you put the p4 executable on your system you may  
need to edit this path, to edit the path setting you need to edit  
your bash login script:
nano -w ~/.bash_login
and add the appropriate paths separated by semi-colons and with the  
variable PATH (the pre-existing paths) appended to the end of the  
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
Save the file (CTRL X), then reread your environment settings:
source ~/.bash_login
and try typing "p4" again

In OS X users are accustomed to putting applications in the  
Applications folder (/Applications), personally I prefer to put the  
p4 executable in /Applications and then just create a symlink to it  
in /usr/local/bin via the command:
sudo ln -sv /Applications/p4 /usr/local/bin/p4
It's necessary to use the sudo command to perform this task in OS X  
as the root user is disabled by default. sudo will ask for your user  
password to authenticate the action.

On Aug 29, 2007, at 7:05 PM, Mike wrote:

> I am having trouble getting p4 command line client to work on OS X  
> 10.4.
> I installed the p4 binary and set its permissions according to the
> instructions in the command line client guide, but whenever I try  
> to run
> p4 at the Terminal I get:
> -bash: p4: command not found
> I have also set the env variables in my profile file as required.
> What else do I need to do to get the command line client to work?

More information about the perforce-user mailing list