拂晓-千云暗组- 努力,执着,意志,精神

mac 安装php扩展时执行 phpize 报错:

2016-05-09

/usr/bin/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:

网上找了下一般是mac升级后导致include找不到了,建立个软链可解决问题:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer

/SDKs/MacOSX10.11.sdk/usr/include/ /usr/include

注意标红处不同的mac系统下可能是不一样的,根据实际情况进行修改。

Author:admin | Categories:php | Tags: