John Davidson

ubuntu - Can't build PHP 8.0.15 with-openssl

0 comments
Message:


I try to build php 8.0.15 from source. I executed ./configure --with-openssl.
If I execute make then I get this (last block):


                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/build/php-8.0.15/ext/openssl/openssl.c:46:
/usr/include/openssl/rsa.h:289:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
289 | RSA *rsa, int padding);
| ~~~~~^~~
make: *** [Makefile:638: ext/openssl/openssl.lo] Error 1

What can I do?




Ubuntu 22.04 LTS


OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)



My Answer:
It looks like there may be an issue with the compatibility between PHP 8.0.15 and OpenSSL 3.0.2. One possible solution is to try building PHP with an older version of OpenSSL that is known to be compatible with PHP 8.0.15.

You can try installing an older version of OpenSSL (e.g., OpenSSL 1.1.1) and then reconfigure and rebuild PHP with that version of OpenSSL. Here are the general steps you can follow:

1. Install an older version of OpenSSL:

sudo apt-get install libssl-dev=1.1.1*


2. Reconfigure PHP with the older version of OpenSSL:

./configure --with-openssl=/usr/include/openssl-1.1


3. Rebuild PHP:

make


If you continue to encounter issues, you may need to investigate further or consider reaching out to the PHP community for additional support.

Rate this post

4 of 5 based on 6114 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us