亲测安装php
1、tar zvxf php-5.3.8.tar.gz 2、cd php-5.3.83、./configure \ --prefix=/usr/local/php \--with-mysql=/usr/local/mysql \ --with-apxs=/usr/local/apache2/bin/apxs \--with-libxml-dir=/usr/local/libxml2
出现问题:
configure: error: xml2-config not found. Please check your
libxml2 installation.
[root@localhost php-5.3.28]# --prefix=/usr/local/php \-------------------------------------------------------解决方案:检查是否安装了libxm包
[root@XKWB3403 php-5.3.8]# rpm -qa |grep libxml2
libxml2-2.6.26-2.1.12libxml2-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
安装成功的标志是出现一个license
--------------------------------------------------然后重新4、make && make install
方法二:安装libxml2(未测)1 tar zxvf libxml2-2.6.32.tar.gz 2 cd libxml2-2.6.323 ./configure --prefix=/usr/local/libxml2 4 make5 make install