Centos 5 linux / PHP prerequisites

If you are building PHP from source on a new server, you might run into few linux prerequisites before you can complete a ./configure. You might not need all of these, or you might need more depending on how much stuff you are including in your configure line. Here is how to fix a good majority of the issues you might run into on Centos 5.

checking for xml2-config path…
configure: error: xml2-config not found. Please check your libxml2 installation.

yum install libxml2-devel

checking for BZip2 support… yes
checking for BZip2 in default path… not found
configure: error: Please reinstall the BZip2 distribution

yum install bzip2-devel

checking for cURL support… yes
checking if we should use cURL for url streams… no
checking for cURL in default path… not found
configure: error: Please reinstall the libcurl distribution –
easy.h should be in /include/curl/

yum install curl-devel

configure: error: libjpeg.(a|so) not found.

yum install libjpeg-devel

configure: error: libpng.(a|so) not found.

yum install libpng-devel

configure: error: libXpm.(a|so) not found.

yum install libX11-devel gd-devel

checking for utf8_mime2text signature… new
checking for U8T_DECOMPOSE…
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

checking for mcrypt support… yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt.

yum install libmcrypt-devel

checking for specified location of the MySQL UNIX socket… /var/lib/mysql/mysql.sock
configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!

yum install mysql-devel

Or all combined into one line:

yum install libxml2-devel bzip2-devel curl-devel libjpeg-devel libpng-devel libX11-devel gd-devel libc-client-devel libmcrypt-devel mysql-devel

2 thoughts on “Centos 5 linux / PHP prerequisites

Comments are closed.