Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
392 views
in Technique[技术] by (71.8m points)

Compiling PHP 7.4.13 on CENTOS 7 gives error

I am trying to upgrade PHP 7.3.9 to 7.4.13, while compiling it gives below error

-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

Here is my PHP compilation configuration

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

Can some please help how to resolve this issue


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Upgrade the -with-openssl=/opt/libressl library to the latest version. That resolved my issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...