Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When trying to install phpDoc through the Terminal I get the following error:

-bash: pear: command not found

Even though I have just installed pear.

Prior to trying to install phpDoc I installed Pear and I got the following warning:

WARNING!  The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
</Users/Mike/pear/share/pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.

Current include path           : .:
Configured directory           : /Users/Mike/pear/share/pear
Currently used php.ini (guess) : 
Press Enter to continue:         

** WARNING! Old version found at /Users/Mike/pear/bin, please remove it or be sure to use the new /Users/Mike/pear/bin/pear command

The 'pear' command is now at your service at /Users/Mike/pear/bin/pear

** The 'pear' command is not currently in your PATH, so you need to
** use '/Users/Mike/pear/bin/pear' until you have added
** '/Users/Mike/pear/bin' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

  http://pear.php.net/faq.php
  http://pear.php.net/manual/

Thanks for using go-pear!

Can someone please walk me through what I need to do to fix this? I am sure it is something simple but I have no idea where to start.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

It says right there in your output:

** The 'pear' command is not currently in your PATH, so you need to
** use '/Users/Mike/pear/bin/pear' until you have added
** '/Users/Mike/pear/bin' to your PATH environment variable.

To add the given command to your PATH, add export PATH=$PATH:/Users/Mike/pear/bin/pear to your ~/.bashrc.

share|improve this answer
    
How do I do that? Is that in the PHP.ini file? –  Mike Oct 17 '13 at 16:25
    
@Mike: See stackoverflow.com/a/11709409/259953 –  Oliver Salzburg Oct 17 '13 at 16:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.