今天搭建LAMP环境是编译PHP时出现的错误汇总。

错误:

configure:error:xml2-confignotfound.Pleasecheckyourlibxml2installation.


解决办法:

yuminstall-ylibxml2-devel

错误:

configure:error:CannotfindOpenSSL's<evp.h>


解决办法:

yuminstall-yopensslopenssl-devel

错误:

checkingforBZip2indefaultpath...notfoundconfigure:error:PleasereinstalltheBZip2distribution


解决办法:

yuminstall-ybzip2bzip2-devel

错误:

configure:error:png.hnotfound.

解决办法:

yuminstall-ylibpnglibpng-devel

错误:

configure:error:freetype.hnotfound.

解决办法:

yuminstall-yfreetypefreetype-devel

错误:

configure:error:mcrypt.hnotfound.Pleasereinstalllibmcrypt.

解决办法:

rpm-ivh"http://www.aminglinux.com/bbs/data/p_w_upload/forum/month_1211/epel-release-6-7.noarch.rpm"yuminstall-ylibmcrypt-devel

错误:

configure:error:jpeglib.hnotfound.

解决办法:

yuminstalllibjpeg-devel

错误:

configure:error:png.hnotfound.

解决办法:

yuminstalllibpng-devel

错误:

configure:error:CannotfindMySQLheaderfilesunder/usr/local/mysql.NotethattheMySQLclientlibraryisnotbundledanymore!

解决办法:


yuminstallmysql-devel