Friday, January 15, 2010

Manually compile php at centos with default installation

If you plan to manually compile php at cents with the default installation , you might need to use the following command to install additional packages before you start the compilation .

yum install gcc httpd-devel libxml2-devel openssl-devel bzip2-devel curl-devel libpng-devel gmp-devel libc-client-devel mysql-devel aspell-devel

Here is the list of error that you might get when you try to compile php yourself at the Cent OS 5.4 server.

1. Configure: error: xml2-config not found. Please check your libxml2 installation.
# yum install libxml2-devel

2. Checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's
# yum install openssl-devel

3. Configure: error: Please reinstall the BZip2 distribution
# yum install bzip2-devel

4. Configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
# yum install curl-devel

5. Configure: error: libjpeg.(a|so) not found.
# yum install libjpeg-devel

6. Configure: error: libpng.(a|so) not found.
# yum install libpng-devel

7. Configure: error: freetype.h not found.
# yum install freetype-devel

8. Configure: error: Unable to locate gmp.h
# yum install gmp-devel

9. Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
# yum install mysql-devel

10. Configure: error: Please reinstall the ncurses distribution
# yum install ncurses-devel

11. Checking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!
# yum install unixODBC-devel

12. Configure: error: Cannot find pspell
# yum install pspell-devel

13. Configure: error: snmp.h not found. Check your SNMP installation.
# yum install net-snmp-devel

14. Configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
# yum install libc-client-devel



Feel free to leave your question or comment here, we will reply you as soon as possible.