centos .php 源码,CentOS 源码安装PHP
2、解壓縮并且進入解壓縮后的文件目錄下
3、./configure --prefix=/data/apps/php --with-config-file-path=/data/apps/php/etc --with-apxs2=/data/apps/apache/bin/apxs --disable-ipv6 --with-curl --with-gd --with-mysql=/data/apps/mysql --with-mysqli=/data/apps/mysql/bin/mysql_config --with-pdo-mysql=/data/apps/mysql --enable-soap --enable-sockets --with-pear=/data/apps/php/pear --with-png-dir --with-libxml-dir --with-jpeg-dir --enable-mbstring --enable-zip --with-zlib --enable-gd-native-ttf --with-freetype-dir=/usr --with-openssl
4、make;make install
遇到問題:
1、configure: error: xml2-config not found. Please check your libxml2 installation(參看:http://blog.csdn.net/anljf/article/details/6981247)
安裝php時的報錯
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
檢查是否安裝了libxm包
[root@XKWB3403 php-5.3.8]# rpm -qa |grep? libxml2
libxml2-2.6.26-2.1.12
libxml2-python-2.6.26-2.1.12
重新安裝libxml2和libxml2-devel包
yum install libxml2
yum install libxml2-devel -y
安裝完之后查找xml2-config文件是否存在
[root@XKWB3403 php-5.3.8]# find / -name "xml2-config"
/usr/bin/xml2-config
如果存在的話重新安裝php
[root@XKWB3403 php-5.3.8]# ./configure
安裝成功的標志是
之后再進行編譯
make && make install
2、configure: error: Cannot find OpenSSL's
解決辦法:yum? install? openssl.x86_64 openssl-devel.x86_64 -y
3、configure: error: Please reinstall the libcurl distribution -?easy.h should be in /include/curl/
解決辦法:yum install libcurl.x86_64 libcurl-devel.x86_64 -y
4、configure: error: libjpeg.(a|so) not found.
解決辦法:yum install libjpeg-devel -y; ?ln -s /usr/lib64/libpng.so /usr/lib/
configure: error: libpng.(a|so) not found.
解決辦法:yum install libpng libpng-devel -y; ln -s /usr/lib64/libpng.so /usr/lib/configure: error: freetype.h not found.
解決辦法:yum install freetype-devel
總結
以上是生活随笔為你收集整理的centos .php 源码,CentOS 源码安装PHP的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php留言板项目经验,php工程师简历项
- 下一篇: h5 socket.io java,从H