Installation failure – the mongodb driver for PHP on El Capitan

driverPHP

I tried to install the mongodb driver for PHP on El Capitan. While running sudo pecl install mongo, I get the error message:

sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo

fatal error: openssl/evp.h: No such file or directory
 #include <openssl/evp.h>
                         ^
compilation terminated.
make: *** [io_stream.lo] Error 1
ERROR: `make' failed
PEAR Version: 1.9.4 PHP Version: 5.5.28

I tried mongo driver install with PHP 5.5.26 also.

Best Answer

It should install the Openssl brew install openssl & brew link openssl --force

Using xcode-select --install to install commande line tools

It does work for me ^^