您的位置:首页 > 编程语言 > PHP开发

编译php-5.5.15出错,xml2-config not found

2016-05-03 17:52 211 查看
今天在centos上编译php-5.5.15,

[plain] view
plain copy







cd php-5.5.15

./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --enable-fpm

返回错误:

[plain] view
plain copy







checking libxml2 install dir... no

checking for xml2-config path...

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

说是libxml2没装,但是用yum安装时发现已经安装了

[plain] view
plain copy







[root@localhost process]# yum install libxml2

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

Setting up Install Process

Package libxml2-2.7.6-14.el6_5.2.i686 already installed and latest version

Nothing to do

查资料后发现原来还需要安装libxml2-devel,再次执行安装命令

[plain] view
plain copy







yum install libxml2* -y

再重新编译php,可以编译成功。
http://blog.csdn.net/haitun312366/article/details/38638335
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: