源碼安裝PHP編譯時出現錯誤示例

錯誤一:

configure: error: cURL version 7.10.5 or later is required to compile php with cURL support

方法一:
#wget https://curl.haxx.se/download/curl-7.20.0.tar.gz
#tar -xzvf curl-7.20.0.tar.gz
#cd curl-7.20.0
#./configure(如果有錯,提示沒有c相關的編譯器,執行#yum install gcc命令)
#make&&make install

方法二:
php7.0.27以上 curl需要單獨安裝:
yum -y install curl-devel
就OK啦~

錯誤二:

configure: error: libxml2 not found. Please check your libxml2 installation.
$ rpm -qa |grep libxml2
libxml2-2.9.1-6.el7_2.3.x86_64
$ sudo yum install libxml2-devel -y

錯誤三:

configure: error: Cannot find OpenSSL's <evp.h>
$ sudo yum install openssl openssl-devel
$ ll /usr/lib64/libssl.so
lrwxrwxrwx 1 root root 16 Dec 15 10:13 /usr/lib64/libssl.so -> libssl.so.1.0.2k

錯誤四:

configure: error: jpeglib.h not found.
解決辦法:
yum -y install libjpeg-devel

錯誤五:

configure: error: png.h not found.
解決辦法:
yum install libpng libpng-devel -y

錯誤六:

configure: error: freetype-config not found.
解決辦法:
yum install freetype-devel

錯誤七:

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解決辦法:
yum -y install libxslt libxslt-devel

大功告成
源碼安裝PHP編譯時出現錯誤示例

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章