-bash:pear:找不到命令


1

当尝试通过终端安装phpDoc时,出现以下错误:

-bash: pear: command not found

即使我刚刚安装了梨。

在尝试安装phpDoc之前,我安装了Pear并收到以下警告:

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!

有人可以指导我解决该问题吗?我敢肯定这很简单,但是我不知道从哪里开始。

Answers:


2

它在您的输出中显示:

** 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.

要将给定命令PATH添加export PATH=$PATH:/Users/Mike/pear/bin/pear到您的,请添加到中~/.bashrc


我怎么做?那是在PHP.ini文件中吗?
Mike

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.