3

I am trying to compile php 5.4.36 with latest curl and openssl (1.0.1l), i have compiled openssl into a separated folder

My system is CentOS.

When i try to compile php with

./configure ...etc... --with-curl=/usr/local/curlfolder --with-openssl=/usr/local/opensslfolder 

I get this error:

checking whether to enable FTP support... yes checking OpenSSL dir for FTP... /usr/local/opensslfolder checking for pkg-config... /usr/bin/pkg-config configure: error: Cannot find OpenSSL's libraries 

Both curl and openssl compiled without any issues

1
  • Try to the SRPMS as a starting point, manually installing software is generally not encouraged. Might be easier to just upgrade to the newest CentOS version. Commented Jan 19, 2015 at 0:01

2 Answers 2

5

these "dirs" are merely prefixes... while cURL basically comes with it's own SSL.

PHP needs to be configured like that, to build for CentOS - with openSSL and cURL:

./configure --build=x86_64-redhat-linux-gnu --with-openssl --with-openssl-dir=/usr/local/bin --with-curl=/usr/local 

(assuming the additional libraries were built with):

./configure --prefix=/usr/local 
2
  • Thank you. The "configure --help" output was not clear on this. Commented Jan 17, 2016 at 4:22
  • @Sarah that is because it's two independent configure scripts, one for the PHP interpreter and one for the libraries which cURL depends on. Commented Jan 18, 2016 at 6:35
1

You can use

--with-openssl or --with-openssl-dir 

If you build openssl from source in folder like /opt/openssl then You can try with

--with-openssl-dir=/opt/openssl 

This was worked for me.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.