Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Im trying to recompile PHP, but ./configure fails at :

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

I have LibSSL 1.0.0, LibSSL 0.9.8, LibSSL-Dev, OpenSSL installed.


when I try with


tells me:

configure: error: Cannot find OpenSSL's libraries

Where the ** are the problem ?

P.S. Php is 5.2.5, OS is Ubuntu

share|improve this question

2 Answers 2

I had the same problem in Ubuntu 12.04.1 LTS and solved it with:

sudo apt-get install libcurl4-openssl-dev pkg-config.

After that I could compile it just using --with-openssl

share|improve this answer
Hello :) I forgot how do I solve my problem. :) It was a half year ago. –  CappY Mar 2 '13 at 21:55

To build php-5.3 on Debian wheezy you need the following to fix this error.

    apt-get install libssl-dev libsslcommon2-dev

Then you need to configure with the following included

    ./configure --with-libdir=/lib/x86_64-linux-gnu ...
share|improve this answer
1+, helped me a lot. I also had to add --with-php-config /usr/local/src/php-x.x.x/scripts/php_config. I have written a how-to compile PHP with extensions. –  DanFromGermany Feb 16 at 22:27
works but fails all test cases. –  Rafael Jul 29 at 4:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.