Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix error with xml2-config not found when installing PHP from sources?

When I try to install php 5.3 stable from source on Ubuntu (downloading compressed installation file from http://www.php.net/downloads.php) and I run ./configure I get this error:

configure: error: xml2-config not found. Please check your libxml2 installation.
like image 200
TroodoN-Mike Avatar asked Nov 11 '13 10:11

TroodoN-Mike


2 Answers

All you need to do instal install package libxml2-dev for example:

sudo apt-get install libxml2-dev

On CentOS/RHEL:

sudo yum install libxml2-devel
like image 92
TroodoN-Mike Avatar answered Nov 05 '22 05:11

TroodoN-Mike


For the latest versions it is needed to install libxml++2.6-dev like that:

apt-get install libxml++2.6-dev
like image 13
Максим Тарасенко Avatar answered Nov 05 '22 05:11

Максим Тарасенко