安装PHP时少库文件解决方法

安装PHP经常会出现少库文件,下面是总结的一些常遇到的:

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


yum -y install libxml2-devel

2、checking for cURL in default path… not found
configure: error: Please reinstall the libcurl distribution –
easy.h should be in /include/curl/

 yum -y install curl-devel

3、configure: error: jpeglib.h not found.
yum -y install libjpeg-devel

4、error: png.h not found.
 yum -y install libpng-devel

5、configure: error: freetype-config not found.
yum -y install freetype-devel

6、configure: error: mcrypt.h not found. Please reinstall libmcrypt
rpm -ivh "http://www.lishiming.net/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm" 
yum install -y libmcrypt-devel 

因为centos6.x 默认的yum源没有libmcrypt-devel 这个包,只能借助第三方yum源。 

7、configure: error: Please reinstall the BZip2 distribution
yum install -y bzip2-devel

此条目发表在linux分类目录,贴了, , 标签。将固定链接加入收藏夹。