解決CentOS下編譯php時的一些典型錯誤辦法
yum安裝必要工具(能解決比編譯遇到到基本問題):
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}