解決make: *** [Makefile:719: ext/openssl/openssl.lo] Error 1問(wèn)題
make: *** [Makefile:719: ext/openssl/openssl.lo] Error 1
在ubuntu系統(tǒng)上編譯安裝PHP7.4.33時(shí)
會(huì)報(bào)錯(cuò)如下:
make: *** [Makefile:719: ext/openssl/openssl.lo] Error 1
原因分析
這個(gè)錯(cuò)誤提示的意思是PHP配置過(guò)程中缺少OpenSSL庫(kù)文件,因此在編譯過(guò)程中出現(xiàn)了問(wèn)題;
Ubuntu 22.04 中openssl默認(rèn)版本是OpenSSL 3.3,與php7.4.33不兼容,支持 SSL 的 Ubuntu 7.4 上的自定義路徑中從源代碼構(gòu)建 PHP 33.22.04 會(huì)導(dǎo)致在 PHP 中使用 SSL 功能時(shí)出錯(cuò)(即簡(jiǎn)單的 )
解決方法
安裝低版本的openssl包
在編譯php時(shí)指定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 注意:如果報(bào)以下錯(cuò),執(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é)
以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
Linux系統(tǒng)crontab定時(shí)運(yùn)行shell腳本失敗的問(wèn)題及解決
Linux地址空間的轉(zhuǎn)換以及線程的理解和使用過(guò)程
Linux如何基于AIDE檢測(cè)文件系統(tǒng)完整性
linux服務(wù)之.service文件使用及說(shuō)明
CentOS7修改服務(wù)器系統(tǒng)時(shí)間的方法

