Php5.6.27 make && Make install reports an error and cannot be resolved. The error contents are as follows:
/usr/develop/php-5.6.27/ext/openssl/openssl.c:3485:14: error: dereferencing pointer to incomplete type 'EVP_PKEY' {aka 'struct evp_pkey_st'}
switch (pkey->type) {
^~
/usr/develop/php-5.6.27/ext/openssl/openssl.c: In function 'php_openssl_pkey_init_dsa':
/usr/develop/php-5.6.27/ext/openssl/openssl.c:3557:10: error: dereferencing pointer to incomplete type 'DSA' {aka 'struct dsa_st'}
if (!dsa->p || !dsa->q || !dsa->g) {
^~
/usr/develop/php-5.6.27/ext/openssl/openssl.c: In function 'php_openssl_pkey_init_dh':
/usr/develop/php-5.6.27/ext/openssl/openssl.c:3580:9: error: dereferencing pointer to incomplete type 'DH' {aka 'struct dh_st'}
Reason: php5.6.27 and OpenSSL 1.1.1c are incompatible.
I checked my OpenSSL version:
[root@node3 php-5.6.27]# openssl version
OpenSSL 1.1.1c FIPS 28 May 2019
Preliminary solution: downgrade the version of OpenSSL. I chose openssl-1.0.0c. Recompile the installation and there will be no compilation errors.
yum remove -y openssl
cd /usr/apps/
wget -c ftp://ftp.openssl.org/source/openssl-1.0.0c.tar.gz
tar -zxf openssl-1.0.0c.tar.gz
cd openssl-1.0.0c/
./config --prefix=/usr/local --openssldir=/usr/local/ssl
make && make install
./config shared --prefix=/usr/local --openssldir=/usr/local/ssl
make clean
make && make install
openssl version # check the version
It’s useless to find. There are always all kinds of problems
Final solution: install php7.3.13
Similar Posts:
- Python3 ImportError: No module named _ssl [How to Solve]
- About the compilation error “dereferencing pointer to incomplete type
- [Solved] Accessing MSSql under Ubuntu prompts SSL Handshake failed with OpenSSL error
- Openeuler: How to Install OpenSSL
- CentOS: How to install OpenSSL
- Mac: How to Solve M2Crypto Install error
- Python Installation WARNING: pip is configured with locations that require TLS/SSL, however the ssl module…
- [Solved] ERR:/usr/local/lib/libcrypto.so.1.0.0: no version information available
- MAC dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
- [Solved] Ruby cannot load such file — zlib, openssl(LoadError), gem No rule to make target `/include/ruby.h’