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) : /usr 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /usr/bin 5. PHP code directory ($php_dir) : /usr/share/pear 6. Documentation directory : /usr/docs 7. Data directory : /usr/data 8. User-modifiable configuration files directory : /usr/cfg 9. Public Web Files directory : /usr/www 10. System manual pages directory : /usr/man 11. Tests directory : /usr/tests 12. Name of configuration file : /private/etc/pear.conf
1-12, 'all' or Enter to continue:
修改安装时的根目录,输入 1,再输入 /usr/local/pear,回车;
修改命令的安装目录,输入 4,再输入 /usr/local/bin,回车;
其它选项使用默认即可,一路回车。
4、测试是否安装成功
输入命令 pear version,如果成功安装将会看到类似如下信息:
1 2 3 4
PEAR Version: 1.10.9 PHP Version: 7.1.23 Zend Engine Version: 3.1.0 Running on: Darwin hongjiahuangdeMac-mini.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64