1. 程式人生 > >centos7編譯安裝php7我遇到的錯誤

centos7編譯安裝php7我遇到的錯誤

關於php.ini

1、如果是rpm包安裝的,預設配置檔案是/etc/php.ini。
2、如果是原始碼包安裝的,需要自己到原始碼包的目錄下複製一個php.ini-development或者php.ini-production到php的配置檔案所在目錄,並改名為php.ini。

關於centos7安裝php7請參考

http://www.jb51.net/article/109228.htm

錯誤1:Cannot find OpenSSL's <evp.h>

解決:yum install openssl openssl-devel

ln -s /usr/lib64/libssl.so /usr/lib/

錯誤2:configure: error: xml2-config not found. Please check your libxml2 installation.

解決:libxml2已經安裝,還報這個錯誤,還需要安裝libxml2-devel

錯誤3:error: Please reinstall the BZip2 distribution

解決:yum -y install bzip2-devel

錯誤4:checking for cURL in default path... not found

解決:yum -y install curl-devel

5:configure: error: jpeglib.h not found.

:yum -y install libjpeg-devel

6:configure: error: png.h not found.

:yum -y install libpng-devel

7:Configure: error: freetype.h not found.

:yum install freetype-devel

8:configure: error: Unable to locate gmp.h

:yum -y install gmp-devel

9:configure: error: mcrypt.h not found. Please reinstall libmcrypt.

:wget https://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz

tar zxflibmcrypt-2.5.8.tar.gz

cdlibmcrypt-2.5.8

./configure

make && make install

10:configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no

:編輯 /etc/ld.so.conf 加入/usr/local/lib,在執行ldconfig。

這個比較麻煩,參考http://www.68idc.cn/help/jiabenmake/qita/2014022169481.html

11:configure: error: Please reinstall readline - I cannot find readline.h

 :yum -y install readline-devel

12:configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

:yum -y install libxslt-devel

13:更多問題請參考http://www.bkjia.com/PHPjc/1008013.html

Thank you for using PHP.

linux裝個php經歷九九八十一難