手动下载go-pear.php文件地址是 链接: go-pear.php.,把这个文件另存为go-pear.php,这个文件放在任意目录下都可以,它是执行文件,打开 terminal 输入命令
先输入
$ php
把go-pear.php文件拽到terminal 输入框
$ php /Users/test/go-pear.php
按回车,terminal显示下列信息
// An highlighted block
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : /Users/dandang/pear
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /Users/dandang/pear/bin
5. PHP code directory ($php_dir) : /Users/dandang/pear/share/pear
6. Documentation directory : /Users/dandang/pear/docs
7. Data directory : /Users/dandang/pear/data
8. User-modifiable configuration files directory : /Users/dandang/pear/cfg
9. Public Web Files directory : /Users/dandang/pear/www
10. System manual pages directory : /Users/dandang/pear/man
11. Tests directory : /Users/dandang/pear/tests
12. Name of configuration file : /Users/dandang/.pearrc
1-12, 'all' or Enter to continue:
继续回车
WARNING! The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
</Users/dandang/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/dandang/pear/share/pear
Currently used php.ini (guess) :
Press Enter to continue:
这个是说需要把文件的配置地址加到php.ini 文件里 把PATH environment 配置好。
** WARNING! Old version found at /Users/dandang/pear/bin, please remove it or be sure to use the new /Users/dandang/pear/bin/pear command
The 'pear' command is now at your service at /Users/dandang/pear/bin/pear
** The 'pear' command is not currently in your PATH, so you need to
** use '/Users/dandang/pear/bin/pear' until you have added
** '/Users/dandang/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/
警告:/Users/dandang/pear/bin 这个路径里的pear是旧版本的。
/Users/dandang/pear/bin/pear 这个路径里的pear是新版本
Thanks for using go-pear!
这样就装完了。