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

 

今天在centos上编译php-5.5.15,

 

 

 

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. cd php-5.5.15  
  2. ./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --enable-fpm  


返回错误:

 

 

 

 

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. checking libxml2 install dir... no  
  2. checking for xml2-config path...   
  3. configure: error: xml2-config not found. Please check your libxml2 installation.  


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

 

 

 

 

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. [root@localhost process]# yum install libxml2  
  2. Loaded plugins: fastestmirror  
  3. Loading mirror speeds from cached hostfile  
  4. Setting up Install Process  
  5. Package libxml2-2.7.6-14.el6_5.2.i686 already installed and latest version  
  6. Nothing to do  


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

 

 

 

 

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. yum install libxml2* -y  


再重新编译php,可以编译成功

posted @ 2016-01-27 22:19  tiandi2050  阅读(202)  评论(0编辑  收藏  举报