解決make: *** [Makefile:719: ext/openssl/openssl.lo] Error 1問題
make: *** [Makefile:719: ext/openssl/openssl.lo] Error 1
在ubuntu系統(tǒng)上編譯安裝PHP7.4.33時
會報錯如下:
make: *** [Makefile:719: ext/openssl/openssl.lo] Error 1
原因分析
這個錯誤提示的意思是PHP配置過程中缺少OpenSSL庫文件,因此在編譯過程中出現(xiàn)了問題;
Ubuntu 22.04 中openssl默認版本是OpenSSL 3.3,與php7.4.33不兼容,支持 SSL 的 Ubuntu 7.4 上的自定義路徑中從源代碼構(gòu)建 PHP 33.22.04 會導(dǎo)致在 PHP 中使用 SSL 功能時出錯(即簡單的 )
解決方法
安裝低版本的openssl包
在編譯php時指定openssl路徑
# wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz # tar -xvf openssl-1.1.1.tar.gz # 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 注意:如果報以下錯,執(zhí)行以下命令解決 OD document had syntax errors at /usr/bin/pod2man line 69.make: * [install_docs] Error1 # mv /usr/bin/pod2man /tmp # make install 重新編譯php,指定openssl路徑為/opt/build即可 # 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
總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
Linux系統(tǒng)crontab定時運行shell腳本失敗的問題及解決
Linux地址空間的轉(zhuǎn)換以及線程的理解和使用過程

