2

I am trying to build php from source but ./configure gives error

configure: error: Cannot find OpenSSL's

my openssl version returns

OpenSSL 1.0.2f  28 Jan 2016

and which openssl

/home/nexusstar/.linuxbrew/bin/openssl

and dpkg -S /usr/include/openssl/conf.h

libssl-dev:amd64: /usr/include/openssl/conf.h

and ll /usr/include/openssl/ | grep "evp.h"

-rw-r--r-- 1 root root  52K дек  4 15:59 evp.h

I try to pass ./configure with and without sudo and try all of the bellow and few more:

--with-openssl=/usr 
--with-openssl=/usr/include
--with-openssl=/usr/include/openssl
--with-openssl=/home/nexusstar/.linuxbrew/bin/openssl
--with-openssl=/home/nexusstar/.linuxbrew/Cellar/openssl/1.0.2f/include/openssl

But it always returns:

configure: error: Cannot find OpenSSL's <evp.h>

or

configure: error: Cannot find OpenSSL

I do not know What I am doing wrong here?

NexusStar
  • 553
  • 1
  • 8
  • 11
  • I getting same error when trying to install php version using `phpbrew` even all libs install but unfortunately not work my case, can you please tell me how you did resolve this error? – Nullpointer Apr 13 '17 at 10:27
  • 1
    Possible duplicate of [Can't find openssl](http://askubuntu.com/questions/211038/cant-find-openssl) – Nullpointer Apr 13 '17 at 10:39

1 Answers1

0

If you install all openssl related library on system even getting error like configure: error: Cannot find OpenSSL's <evp.h> and configure: error: Cannot find OpenSSL then try to set below variable.

$ OPENSSL_LIBDIR=/usr/include/openssl
$ OPENSSL_INCDIR=/usr/include/openssl
Nullpointer
  • 1,151
  • 3
  • 15
  • 32