centos6.2 安装php5.3错误

安装过程中出现小问题:

./configure --prefix=/usr/local/webserver/php5 --with-apxs2=/usr/local/apache2/bin/apxs --enable-trace-avrs --with-mysql=/usr/local/webserver/mysql --with-zlib --enable-shared --with-png --enable-mbstring=all --enable-mbregex --enable-so

出现:configure: error: xml2-config not found. Please check your libxml2 installation.
错误原因,xml2-config这个文件没找到。

安装 configure --prefix=/usr/local/libxml2 后,指定这个目录还是不行,于是rpm -qa|grep libxml2
找到了三个包,其中一个卸载不掉,就把

zlib-devel-1.2.3-27.el6.i686.rpm

libxml2-devel-2.7.6-4.el6.i686.rpm

libxml2-2.7.6-4.el6.i686.rpm

libxml2-python-2.7.6-4.el6.i686.rpm

重新装了一遍,其中libxml2-devel-2.7.6-4.el6.i686.rpm 依赖zlib-devel-1.2.3-27.el6.i686.rpm,不安装zlib。。的话,安不上,把这几个都弄好后,进入到php里重新configure 并且把-with-libxml=/usr/local/libxml2

去掉,就安装过了。

猜你喜欢

转载自vtrtbb.iteye.com/blog/1931324
今日推荐