using Phpize to dynamically add PHP extensions is something that you often need to do in development, but in MacOS, the first time you use this feature you will inevitably encounter some problems, and this article will provide some common troubleshooting methods.
Question one:
Execution Phpize error is as follows:
$ phpize grep:/usr/include/php/main/php.h:no such file or directorygrep:/usr/include/php/zend/zend_modules.h:no such F Ile or Directorygrep:/usr/include/php/zend/zend_extensions.h:no such file or directoryconfiguring For:PHP Api Version:< C3/>zend Module API No: Zend Extension API No:
Workaround:
$ ln-s/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.12.sdk/usr/ Include/usr/include
PS: If you still notice that you do not have permission to operate after Sudo, consult the rootless mechanism in MacOS.
Question two:
Execution Phpize error is as follows:
$ phpize Cannot find autoconf. Please check your autoconf installation and THE$PHP_AUTOCONF environment variable. Then, rerun the this script.
Workaround:
Install Homebrew First:
$ RUBY-E "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install autoconf:
$ Brew Install autoconf
Ps:homebrew's powerful who knows with whom. Manually installing the AUTOCONF package is not recommended because there are too many dependent packages ~ ~
How Mac uses homebrew to install LNMP detailed
Explain how Mac uses homebrew to install MySQL can't login problem solution
Mac 10.10 PHP uses homebrew after installation problems