【问题标题】:Compiling PHP 7.4.13 on CENTOS 7 gives error在 CENTOS 7 上编译 PHP 7.4.13 会出错
【发布时间】:2020-12-31 02:47:27
【问题描述】:

我正在尝试将 PHP 7.3.9 升级到 7.4.13,但编译时出现以下错误

-lcrypto -lcrypt  -o sapi/cli/php
/bin/ld: warning: libssl.so.10, needed by /usr/lib64/libssh2.so.1, may conflict with libssl.so.38
/bin/ld: warning: libcrypto.so.10, needed by /usr/lib64/libssh2.so.1, may conflict with libcrypto.so.37
/bin/ld: ext/openssl/.libs/openssl.o: undefined reference to symbol 'X509_get_signature_nid@@libcrypto.so.10'
/usr/lib64/libcrypto.so.10: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
exiting with zero status

这是我的 PHP 编译配置

./configure \
       --prefix=/opt/php \
       --with-apxs2=/opt/apache/bin/apxs \
       --with-ldap=/opt/openldap \
       --enable-soap \
       --enable-sockets \
       --with-pgsql=/opt/php/pgsql \
       --with-pdo-pgsql=/opt/php/pgsql \
       --with-mysql \
       --with-pdo-mysql \
       --with-gd \
       --with-jpeg-dir \
       --with-png-dir \
       --with-zlib-dir \
       --with-freetype-dir \
       --enable-gd-native-ttf \
       --enable-pcntl \
       --with-openssl=/opt/libressl \
       --with-openssl-dir=/opt/libressl \
       --with-curl=/opt/curl \
       --enable-mbstring \
       --with-mcrypt \
       --with-config-file-path=/opt/php/etc \
       --with-config-file-scan-dir=/opt/php/etc/php.d \
       --enable-zip \
       --with-xsl \
       --without-libzip

请大家帮忙解决一下这个问题

【问题讨论】:

    标签: php compiler-errors centos7


    【解决方案1】:

    -with-openssl=/opt/libressl 库升级到最新版本。这解决了我的问题。

    【讨论】:

      猜你喜欢
      • 2021-11-03
      • 2015-11-21
      • 1970-01-01
      • 2020-10-25
      • 2012-03-20
      • 2017-12-20
      • 2015-09-25
      • 2017-01-13
      • 1970-01-01
      相关资源
      最近更新 更多