Solutions to some typical errors during php compilation in CentOS
Yum install necessary tools (which can solve basic problems encountered during compilation ):
yum-yinstallgccgcc-c++makecmakeautomakeautoconfkernel-develncurses-devellibxml2-developenssl-develcurl-devellibjpeg-devellibpng-develpcre-devellibtool-libsfreetype-develgdzlib-develfilebisonpatchmlocateflexdiffutilsreadline-develglibc-develglib2-develbzip2-develgettext-devellibcap-devellibmcrypt-developenldapopenldap-devellibxslt-devel
Configure: error: xml2-config not found. Please check your libxml2 installation.
configure:error:CannotfindOpenSSL’s
yuminstallopenssl-develconfigure:error:Pleasereinstallthelibcurldistribution-easy.hshouldbein/include/curl/
configure:error:libjpeg.(a|so)notfound
configure:error:libpng.(a|so)notfound.
yuminstalllibpng-develconfigure:error:libXpm.(a|so)notfound.
configure:error:freetype.hnotfound.
yuminstallfreetype-devel
configure:error:utf8_mime2text()hasnewsignature,butU8T_CANONICALismissing.Thisshouldnothappen.Checkconfig.logforadditionalinformation.
yuminstalllibc-client-devel
configure:error:mcrypt.hnotfound.Pleasereinstalllibmcrypt.
yuminstalllibmcrypt-devel
configure:error:Pleasereinstalllibmhash–Icannotfindmhash.h
yuminstallmhash-devel
configure:error:CannotfindMySQLheaderfilesunder/usr.NotethattheMySQLclientlibraryisnotbundledanymore!
yuminstallmysql-devel
configure:error:Pleasereinstallmingdistribution.libming.(a|so)notfound-tempremovetheconfigfor‘–with-ming=/opt/ming/’configure:error:Cannotfindpspell
yuminstallpspell-devel
configure:error:cannotfindmmlibraryDownloadfromhttp://www.ossp.org/pkg/lib/mm/
Wget ftp://ftp.ossp.org/pkg/lib/mm/mm-1.4.2.tar.gz
Tar-zxvf mm-1.4.2.tar.gz
./Configure
Make
Make install
Configure: error: Cannot find libtidy
Yum install libtidy-devel
Yum install libtidy
Change path at configure: '-with-tidy =/usr' configure: error: not found. Please reinstall the expat distribution.
yuminstallexpat-devel
configure:error:xslt-confignotfound.Pleasereinstallthelibxslt>=1.1.0distribution
yuminstalllibxslt-devel*Tips:Touninstall,justenter:yumremove{package-name}