当前位置: 代码迷 >> 综合 >> MAC OS X 安装 pecl
  详细解决方案

MAC OS X 安装 pecl

热度:2   发布时间:2024-01-12 14:06:43.0

这算是为了安装php扩展做的准备工作吧:

1. cd  /usr/lib/php

2. sudo php install-pear-nozlib.phar


[PEAR] Archive_Tar    - installed: 1.3.11

[PEAR] Console_Getopt - installed: 1.3.1

warning: pear/PEAR requires package "pear/Structures_Graph" (recommended version 1.0.4)

warning: pear/PEAR requires package "pear/XML_Util" (recommended version 1.2.1)

[PEAR] PEAR           - installed: 1.9.4

Wrote PEAR system config file at: /usr/local/etc/php/5.6/pear.conf

You may want to add: /usr/local/Cellar/php56/5.6.23/lib/php/pear to your php.ini include_path

[PEAR] Structures_Graph- installed: 1.0.4

[PEAR] XML_Util       - installed: 1.2.1


然后,编辑php.ini文件

vi   /usr/local/etc/php/5.6/php.ini

将其中的include_path改为:

include_path = ".:/usr/local/Cellar/php56/5.6.23/lib/php/pear"

然后,执行命令:

sudo pear channel-update pear.php.net 

sudo pecl channel-update pecl.php.net 

sudo pear upgrade-all

即可。