mongo-php-driver: configure: error: Cannot find OpenSSL's

WHen I am trying to install mongodb driver using pecl in MAC. its gives error like that atlast:-

configure: error: Cannot find OpenSSL’s <evp.h> ERROR: `/private/tmp/pear/temp/mongodb/configure --with-php-config=/usr/local/Cellar/php70/7.0.9/bin/php-config’ failed

But I have installed openssl in my system. I am not getting whats the problem. Please help.

If there have any way to install without using pecl, then tell me.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

@lenmen Thank you, I resolved this question in mac below:

ln -s /usr/local/Cellar/openssl/1.0.2m/include/openssl /usr/local/include/openssl

OSX no longer ships the OpenSSL developers headers, only the runtime library.

Try

$ brew install openssl
$ export LDFLAGS="-L/usr/local/opt/openssl/lib"
$ export CFLAGS="-I/usr/local/opt/openssl/include"
$ pecl install mongodb

This will no longer be necessary when the driver switches away from PHP streams to using the mongoc provided Native TLS, which does not rely on OpenSSL

I got that problem too. When I looked at the answer at stackoverflow and the answer on that question worked for me.

http://stackoverflow.com/questions/33483210/using-pecl-to-install-the-mongodb-driver-on-os-x-el-capitan-v10-11-1

might work on you’re case too.

i fixit by simply installing pkg-config $ brew install pkg-config $ pecl install mongodb

I have checked, openssl is installed in my system.

I followed above steps but above problem is not resolved.

What I need to do for ignore this error. I am not php guy but need to deploy backend in my system.