How to upgrade libxml on CentOS

2

I have a following version of CentOS:

$ cat /etc/issue
CentOS release 5.5 (Final)
Kernel \r on an \m

and following version of libxml:

$ php -i | grep libxml
libxml Version => 2.6.26
libxml
libxml2 Version => 2.6.26
libxslt compiled against libxml Version => 2.6.26

and need to have newer version of libxml (primarly for usage in PHP, but obviously, it doesn't matter).

If I even install the newer version of libxml somehow:

wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz
tar -xvf libxml2-2.7.2.tar.gz
cd libxml2-2.7.2
./configure
make
sudo make install

then I am unable to get it to work in PHP - there is still old version:

libxml Version => 2.6.26
libxml
libxml2 Version => 2.6.26
libxslt compiled against libxml Version => 2.6.26

What else do I need to do to make the new version to work with PHP?

Radek Simko

Posted 2012-07-03T22:51:07.087

Reputation: 392

Maybe the solution would be to find some repository with newer libxml version instead of compiling it, but I've found nothing. :/ – Radek Simko – 2012-07-03T23:04:03.827

Answers

3

It was necessary to recompile the PHP with new version of libxml. More there: https://serverfault.com/a/305682/73850

Radek Simko

Posted 2012-07-03T22:51:07.087

Reputation: 392

would be great if you post the solution here – dude – 2015-01-17T18:03:07.933

The solution is linked in the answer. – Radek Simko – 2015-01-18T16:03:18.643