configure: error: xml2-config not found. Please check your libxml2 installation.

On Centos 6.3 while installing PHP 5.4 I ran into the subject error.
This fixed it:
# yum install libxml2-devel
note: on other OS you should try to apt-get install libxml2-dev

Here is the configure command I’m trying to do:

'./configure' \
'--with-apxs2=/usr/local/apache2/bin/apxs' \
'--with-mysql' \
'--libdir=/usr/lib64' \
'--with-libdir=lib64' \
'--with-zlib' \
'--with-gettext' \
'--with-gdbm' \
'--with-gd' \
'--with-jpeg-dir=/usr' \
'--with-freetype-dir=/usr' \
'--with-mcrypt' \
'--with-openssl' \
"$@"

Next error: configure: error: DBA: Could not find necessary header file(s).
fixed it with:
# yum install gdbm-devel

Next: configure: error: jpeglib.h not found.
# yum install libjpeg-devel.x86_64
(that was a hard one to find!)

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

configure: error: mcrypt.h not found. Please reinstall libmcrypt.
There does not seem to be any good / easy solution to this on CentOS 6.3.

UPDATE: This guy has the solution

rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
yum update
yum install libmcrypt-devel
yum install mcrypt-devel
yum install php-mcrypt

Configure worked!
it works now, yay

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to configure: error: xml2-config not found. Please check your libxml2 installation.

Leave a Reply

Your email address will not be published. Required fields are marked *