Mac OS X 10.9 (Mavericks)时安装php扩展问题phpize

执行执行 phpize 报错:

grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:

解决办法:

sudo ln -s
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include
/usr/include

如果执行 phpize 提示如下错误:

Cannot find autoconf. Please check your autoconf installation
and the $PHP_AUTOCONF environment variable.

解决办法:

先安装Homebrew:

ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”

然后安装 autoconf :

brew install autoconf

Zmsky

http://xloli.net/?page_id=11

发表评论