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

JackDoe
  • 41
  • 1
  • 1
  • 2
  • 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. – fuero Jan 19 '15 at 00:01

2 Answers2

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
Martin Zeitler
  • 171
  • 1
  • 6
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.

Alexander Tolkachev
  • 4,608
  • 3
  • 14
  • 23