When installing mongodb extension through phpize under Mac, openssl obviously has been updated and conforms to the version but cannot pass? What is this?

  mongodb, question

Today, when installing the MongoDB extension of PHP7 on the Mac, I encountered such a problem. It is too strange. Details are as follows:

The original Mac systemopensslReplace with PassbrewNew version installed


CurrentopensslVersion details are as follows


And PHP extensionsopensslIt has also been opened




During generationMakefileWhen is still a hintopensslThe version is too low. What the hell is this?

./configure --with-php-config=/usr/local/Cellar/php71/7.1.13_24/bin/php-config


I’ve tried everything I can think of. I’ve really seen ghosts. What’s the situation with the old irons? What should I do? Thank you

I have seen the problem that the HEADER file cannot be found. After processing, I can successfully compile, install and generate it.mongodb.soModule files, but there is also a simple way to update, not to usepeclAndphpizeInstallationmongodbExtension, that is, usingbrew install phpVS-mongodbTo install,phpVSIs the specific version number, after installation and expansion throughbrewRestartphpIt will take effect! This approach also facilitates management expansion throughbrewInstalled extensions will be installed at/usr/local/etc/php/7.1/conf.d/Directory to generate the corresponding extension configuration files such asext-mongodb.ini, restartphpIt will be loadedconf.dThe configuration file for the directory. Thanks, Laotie!