Error resolution for dynamically adding PHP extensions using Phpize in MacOS

Source: Internet
Author: User
Tags install homebrew
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.