使用cURL编译PHP失败 [英] Compile PHP with cURL fail

查看:148
本文介绍了使用cURL编译PHP失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Ubuntu上手动编译PHP(7.0.7)和cURL(7.49.1)。在PHP编译期间会看到以下错误:

I am manually compiling PHP (7.0.7) and cURL (7.49.1) on Ubuntu. The following error is seen during PHP compilation:

checking for cURL support... yes
checking for cURL 7.10.5 or greater... libcurl 7.49.1
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... cc -E
checking for openssl support in libcurl... no
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... no
configure: error: There is something wrong. Please check config.log for more information.

卷曲配置:

./configure --prefix="${INSTALL_PATH}/curl"              \
            --with-openssl="${INSTALL_PATH}/openssl/"

PHP配置

./configure --prefix="${INSTALL_PATH}/php"              \
                --with-apxs2="${INSTALL_PATH}/httpd/bin/apxs"   \
                --with-libxml-dir="${INSTALL_PATH}/libxml2"     \
                --with-gettext                                  \
                ${openldap_lib_option}                  \
                --with-openssl="${INSTALL_PATH}/openssl/" \
                --with-curl="${INSTALL_PATH}/curl/"

感谢任何输入。我需要额外的包裹吗?
如果编译不带cURL支持的PHP,一切都很好。

Appreciate any input. Do I need to get any extra package? If compile PHP without cURL support, everything is fine.

完整的config.log文件为这里。 config.log中有一堆OpenSSL内容的未定义引用。但是我不认为这是导致错误的原因,因为libcurl的gnutls测试和openssl测试也会发生相同的未定义引用。但是,这很奇怪,因为我在软件包中添加了OpenSSL(1.0.2g),但仍然看到正在libcurl中检查对opensl的​​支持...否。

The full config.log file is here. There is a bunch of "undefined reference" of OpenSSL stuff in the config.log. But I don't think they are the cause of the error as the same "undefined reference" happens for gnutls test and openssl test of libcurl as well. But it is a strange though as I have added OpenSSL (1.0.2g) in the package but still seeing "checking for openssl support in libcurl... no"..

我正在使用Ubuntu 12.04 amd64进行编译。但是很快还将使用14.04 / 16.04 x86 / amd64进行编译。

I am using Ubuntu 12.04 amd64 to compile now. But soon will use 14.04/16.04 x86/amd64 to compile as well.

推荐答案

我刚刚在Debian 8上编译了PHP 7.0.8。具有curl和openssl支持。

I just compiled PHP 7.0.8 on Debian 8 with curl and openssl support.

这是我安装的以避免编译错误的依赖项:

And here are dependencies which i installed to avoid compilation errors:

apt-get install libssl-dev libcurl4-openssl-dev pkg-config

另外,我的./接下来是本节中的配置选项:

Plus, my ./configure options in this section are next:

--with-libdir=lib/x86_64-linux-gnu \
--with-openssl=/usr \
--with-curl \

这里是bugs.php.net上的相关主题:

Here is related topic on bugs.php.net:

https://bugs.php.net/bug.php?id=69510

希望这会有所帮助

这篇关于使用cURL编译PHP失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆