【发布时间】:2016-10-05 22:38:36
【问题描述】:
我在 Ubuntu 上手动编译 PHP (7.0.7) 和 cURL (7.49.1)。 PHP编译时出现如下错误:
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,一切都很好。
完整的 config.log 文件是 here。 config.log 中有一堆 OpenSSL 的“未定义引用”。但我不认为它们是错误的原因,因为 gnutls 测试和 libcurl 的 openssl 测试也会发生相同的“未定义引用”。但这很奇怪,因为我在包中添加了 OpenSSL (1.0.2g) 但仍然看到“正在检查 libcurl 中的 openssl 支持...否”..
我现在使用 Ubuntu 12.04 amd64 编译。但很快也会使用 14.04/16.04 x86/amd64 编译。
【问题讨论】:
-
config.log 中有什么内容?
-
它是关于哪个版本的 Ubuntu?像 Ubuntu 14.04 - amd64 等 -
-
@Kund 哦,我从来不知道 Ubuntu 版本很重要。是因为编译器吗?因为我没有使用任何操作系统包,所以我自己构建了所有包......我现在正在 Ubuntu 12.04 amd64 上构建它。但我还需要尽快在 Ubuntu 14.04/16.04 x86/amd64 上构建它。
标签: php linux curl compilation