Original address
http://blog.csdn.net/white__cat/article/details/28907535
'./configure ' –prefix=/usr/local/php ' –with-config-file-path=/etc ' –with-mysql=/usr/local/mysql ' – With-mysqli=/usr/local/mysql/bin/mysql_config ' –with-iconv-dir=/usr/local ' –with-freetype-dir ' –with-jpeg-dir ' ' –with-png-dir ' –with-zlib ' –with-libxml-dir=/usr ' –enable-xml ' –disable-rpath ' –enable-safe-mode ' – Enable-bcmath ' –enable-shmop ' –enable-sysvsem ' –enable-inline-optimization ' –with-curl ' –with-curlwrappers ' – Enable-mbregex ' –enable-fpm ' –enable-mbstring ' –with-mcrypt ' –with-gd ' –enable-gd-native-ttf '- With-mhash ' –enable-pcntl ' –enable-sockets ' –with-xmlrpc ' –enable-zip ' –enable-soap '
Error occurred as follows:
Error One:
Configure:error:xml2-config not found. Please check your LIBXML2 installation.
and I have installed LIBXML2, but I still have this hint:
Workaround:
# sudo apt-get install Libxml2-dev
Error Two:
Configure:error:Please Reinstall the BZIP2 distribution
And I have installed the bzip2, the online solution is to find the need to install Bzip2-dev, but 11.10 there is no this library.
Solution: Find bzip2-1.0.5.tar.gz on the internet, unzip, make directly, sudo make install. (The source I'm using is from http://ishare.iask.sina.com.cn/f/9769001.html)
Error Three:
Configure:error:Please Reinstall the Libcurl distribution-easy.h should be in/include/curl/
Workaround:
# sudo apt-get install Libcurl4-gnutls-dev
Error Four:
Configure:error:jpeglib.h not found.
Workaround:
# sudo apt-get install Libjpeg-dev
Error Five:
Configure:error:png.h not found.
Workaround:
# sudo apt-get install Libpng-dev
Error Six:
CONFIGURE:ERROR:LIBXPM. (A|SO) not found.
Workaround:
# sudo apt-get install Libxpm-dev
Error Seven:
Configure:error:freetype.h not found.
Workaround:
# sudo apt-get install Libfreetype6-dev
Error Eight:
Configure:error:Your t1lib distribution is not installed correctly. Please reinstall it.
Workaround:
# sudo apt-get install Libt1-dev
Error Nine:
Configure:error:mcrypt.h not found. Please reinstall Libmcrypt.
Workaround:
# sudo apt-get install Libmcrypt-dev
Error Ten:
Configure:error:Cannot find MySQL header files under Yes.
Note that the MySQL client library isn't bundled anymore!
Workaround:
# sudo apt-get install Libmysql++-dev
Error 11:
Configure:error:xslt-config not found. Please reinstall the LIBXSLT >= 1.1.0 distribution
Workaround:
# sudo apt-get install Libxslt1-dev
It can be seen that PHP source installation before installing these dependencies, detailed visibility http://forum.ubuntu.org.cn/viewtopic.php?f=88&t=231159
Once the errors are resolved, again./config. After no errors,
# make
# sudo make install
(go) Ubuntu source code Compilation install PHP common error Resolution