doumu9019 2016-06-06 10:46
浏览 417

用cURL编译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.

Curl configuration:

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

PHP configuration

./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/"

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

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"..

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

  • 写回答

1条回答 默认 最新

  • douzhou7124 2016-07-07 12:49
    关注

    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 \
    

    Here is related topic on bugs.php.net:

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

    Hope this helps

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?