Reputation: 1695
I'm not new to XAMPP, PHP, or MongoDB, but I'm new to Mac, so getting the PHP MongoDB driver set up is causing me more trouble than it probably should.
When I try to run $ sudo pecl install mongodb
from /applications/xampp/xamppfiles/bin
I get this error:
configure: error: Cannot find OpenSSL's <evp.h>
ERROR: `/private/tmp/pear/install/mongodb/configure --with-php-config=/usr/bin/php-config' failed
Because I'm so new to Mac, I'm not even sure how to approach this error. I used which openssl
to see if OpenSSL is installed, and it returned /usr/bin/openssl
.
Can anyone suggest how to fix this problem?
Upvotes: 3
Views: 847
Reputation: 3113
What worked for me was to use the OpenSSL headers from Brew:
brew install openssl
C_INCLUDE_PATH=/usr/local/opt/openssl/include bin/pecl install mongodb
Upvotes: 3