Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I keep getting half hourly email messages from the root cron relating to php startup error messages:

Subject:
Cron <root@hostname> [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm

Message content (snipped)
php5: /usr/local/lib/libxml2.so.2: no version information available (required by php5)

Running php -v from a prompt reveals the same:
php -v
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
<snip>
PHP 5.3.3-1ubuntu9.9 with Suhosin-Patch (cli) (built: Feb 9 2012 06:37:37)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

I did an "apt-get upgrade php5-cli", hence the recent build date.

phpinfo() shows that it is using 2.7.7 of libxml2

Doing a locate on libxml2.so reveals:

/usr/lib/libxml2.so.2
/usr/lib/libxml2.so.2.7.7
/usr/local/lib/libxml2.so
/usr/local/lib/libxml2.so.2
/usr/local/lib/libxml2.so.2.7.3
/var/src/libxml2-2.7.3/.libs/libxml2.so
/var/src/libxml2-2.7.3/.libs/libxml2.so.2
/var/src/libxml2-2.7.3/.libs/libxml2.so.2.7.3

Server info:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_codeNAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"

FYI, 64bit install on RS cloud. Linux cfpbbh1 2.6.35.4-rscloud #8 SMP Mon Sep 20 15:54:33 UTC 2010 x86_64 GNU/Linux

This has me baffled, and google isn't helping too much, nothing ubuntu specific at least, lots of cpanel/directadmin options but these arent installed...

There is one other question on this forum with the same problem, with the solution being to have symlinks pointing from the old to the new version... but it seems there already is:

/usr/lib# ll | grep libxml
lrwxrwxrwx 1 root root 16 Feb 14 11:54 libxml2.so -> libxml2.so.2.7.7
lrwxrwxrwx 1 root root 16 Feb 14 12:25 libxml2.so.2 -> libxml2.so.2.7.7
-rw-r--r-- 1 root root 1364056 Jan 18 22:28 libxml2.so.2.7.7

Anyone care to help? Assistance much appreciated... If someone could tag this with libxml2 it may help others.

share|improve this question
    
Possibly related: askubuntu.com/q/41835/6969 –  Lekensteyn Feb 20 '12 at 11:53
    
Hi... yes... I read the solution there, however as I said in the question it seems there are symlinks in /usr/lib dir already –  hdotnet Feb 20 '12 at 13:05
add comment

1 Answer 1

I had the same problem. I ended up in your situation, when I needed a newer version of libxml than the one packaged with my release. I installed it manually, so I ended up with two installations of libxml. What I did was removing all libxml libraries from /usr/local/lib, leaving only packaged libraries in /usr/lib. PHP warnings then disappeared.

Thus you should be able to resolve simply by

sudo rm /usr/local/lib/libxml2.so*

You might want to backup libxml2.so* before deletion. Hope this helps someone.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.