Search code examples
phpmongodbdriverosx-elcapitan

Installation failure - the mongodb driver for PHP on El Capitan


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.


Solution

  • I had the same problem. Install this script which installs a clean version of php: curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

    See this blog post for more info: http://jacurtis.com/easily-install-mcrypt-php-mavericks-yosemite/