make: *** [Makefile:719: ext/openssl/] Error 1
When compiling and installing PHP7.4.33 on ubuntu system
An error will be reported as follows:
make: *** [Makefile:719: ext/openssl/] Error 1
Cause analysis
The error message means that the OpenSSL library file is missing during the PHP configuration process, so there is a problem during the compilation process;
The default version of openssl in Ubuntu 22.04 is OpenSSL 3.3, which is incompatible with php7.4.33. Building PHP 33.22.04 from source code in a custom path on Ubuntu 7.4 that supports SSL will cause an error when using SSL functionality in PHP (i.e. simple)
Solution
Install the lower version of the openssl package
Specify openssl path when compiling php
# wget /source/old/1.1.1/openssl-1.1. # tar -xvf openssl-1.1. # cd openssl-1.1.1 # ./Configure --prefix=/opt/build --openssldir=/opt/build -fPIC -shared linux-x86_64 -Wl,--enable-new-dtags,-rpath,'/opt/build/lib'; # make && make install Notice:If the following error is reported,Execute the following command to resolve OD document had syntax errors at /usr/bin/pod2man line : * [install_docs] Error1 # mv /usr/bin/pod2man /tmp # make install Recompilephp,SpecifyopensslThe path is/opt/buildJust # export PKG_CONFIG_PATH=/opt/build/lib/pkgconfig; # export LD_LIBRARY_PATH=/opt/build/lib; # export OPENSSL_CONF=/etc/ssl # ./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-openssl=/opt/build --enable-gd pdo_sqlite --with-jpeg && make && make install
Summarize
The above is personal experience. I hope you can give you a reference and I hope you can support me more.