首页 > 代码库 > 升级mac中的系统之后,给PHP安装扩展常出现问题
升级mac中的系统之后,给PHP安装扩展常出现问题
(1)在装mcrypt插件时报错,提示:mcrypt fatal error: ‘php.h‘ file not found,
然后又仔细操作了一次在输完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
(2)执行./confiure是报错
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select to change
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
升级mac中的系统之后,给PHP安装扩展常出现问题