用最新的 openssl 和 curl 编译 php

Jac*_*Doe 3 php openssl curl

我正在尝试使用最新的 curl 和 openssl (1.0.1l) 编译 php 5.4.36,我已将 openssl 编译到一个单独的文件夹中

我的系统是 CentOS。

当我尝试编译 php 时

./configure  ...etc... --with-curl=/usr/local/curlfolder --with-openssl=/usr/local/opensslfolder
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

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
Run Code Online (Sandbox Code Playgroud)

curl 和 openssl 都编译没有任何问题

Mar*_*ler 5

这些“目录”只是前缀……而 cURL 基本上带有它自己的 SSL。

PHP 需要像这样配置,以便为 CentOS 构建 - 使用 openSSL 和 cURL:

./configure --build=x86_64-redhat-linux-gnu --with-openssl --with-openssl-dir=/usr/local/bin --with-curl=/usr/local
Run Code Online (Sandbox Code Playgroud)

(假设额外的库是用构建的):

./configure --prefix=/usr/local
Run Code Online (Sandbox Code Playgroud)