您的位置:首页 > 运维架构 > Linux

centos6.2 linux安装php过程及配置错误处理 configure: error: xml2-config not found. Please check your libxml2 i

2012-07-10 14:26 846 查看
cd /usr/local/src

tar -zvxf php-5.3.10.tar.gz

cd php-5.3.10

mkdir -p /usr/local/php5 #建立php安装目录

./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd --with-iconv
--with-freetype --with-jpeg --with-png --with-zlib --with-libxml --enable-xml --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-fastcgi
--enable-force-cgi-redirect --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin --enable-session --with-mcrypt
#配置

错误一:

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

错误二:configure: error: png.h not found.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐