php curl 要安装pear,MacOS 安装pear
1、下載Pear
curl -O https://pear.php.net/go-pear.phar
2、安裝Pear
sudo php -d detect_unicode=0 go-pear.phar
安裝過程需要進行簡單的配置,如下
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
輸入 1,將安裝根目錄修改為 /usr/local/pear;
輸入 4,將命令安裝到 /usr/local/bin 目錄;
其它選項默認即可,一路回車。
檢測是否安裝成功
輸入 pear version
pear version
如果現實如下信息,則安裝成功
PEAR Version: 1.10.5
PHP Version: 7.1.7
Zend Engine Version: 3.1.0
如果還是顯示
command not found: pear
則可能是pear的環境變量沒有配置
打開bash.profile
open ~/.bash_profile
添加pear的路徑
export PATH="/usr/bin/pear:$PATH"
保存配置
source ~/.bash_profile
再次執行pear version查看信息即可
總結
以上是生活随笔為你收集整理的php curl 要安装pear,MacOS 安装pear的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 缓存接口,java项目中,针对
- 下一篇: docker rabbitmq php扩