I was installing PHP on a CentOS (Linux) server yesterday (using the configure script), and ran into an error related to my libxml2 installation. Here's the complete error message that shows up at the end of the configure script output:
configure: error: xml2-config not found. Please check your libxml2 installation.
During a Google search I saw some different possible answers to this problem, but on my CentOS/Linux server I was able to solve this problem by installing the
libxml2-devel.i386 package with yum, like this:
yum install libxml2-devel.i386
After that, the PHP installation via the configure script worked just fine, problem solved.
And on x86_64 run:
yum install libxml2-devel.x86_64