[p4] P4 command line client not working

Mike lists at michael-amorose.com
Wed Aug 29 23:07:08 PDT 2007


Thanks for everyone's help. It was indeed the PATH variable.

Perforce's docs say to put the binary in /usr/local/bin and the default 
OS X profile file lacks this path so changing it from:

PATH=/bin:/sbin:/usr/bin:/usr/sbin

to

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

does the trick.

Thanks,

Mike

Patrick M. Slattery wrote:
> 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
> set
> This will display all of your user variables, the default path  
> variable in OS X 10.4 is typically:
> PATH=/bin:/sbin:/usr/bin:/usr/sbin
> 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  
> declaration.
> 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?
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
> 
> 



More information about the perforce-user mailing list