今天准备安装PHP扩展运行phpizeOSX10111-3c15c2ba060a:imagick-3.4.2 zhoumengkang$ 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:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
原来都在这个目录里OSX10111-3c15c2ba060a:include zhoumengkang$ ls|grep php/
TSRM/ Zend/ ext/ include/ main/ sapi/
OSX10111-3c15c2ba060a:include zhoumengkang$ pwd
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/includeOSX10111-3c15c2ba060a:include zhoumengkang$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include /usr/include
Password:
ln: /usr/include: Operation not permitted
最后通过OSX10111-3c15c2ba060a:include zhoumengkang$ xcode-select --install
xcode-select: note: install requested for command line developer tools
再运行OSX10111-3c15c2ba060a:imagick-3.4.2 zhoumengkang$ phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
再安装下autoconfOSX10111-3c15c2ba060a:imagick-3.4.2 zhoumengkang$ brew install autoconf
/usr/local/Cellar/autoconf/2.69: 70 files, 3.0M