LIBXML2_2.9.0 not found

jonathanc

Verified User
Joined
Aug 18, 2007
Messages
47
On Centos 6.7 when I attempt to build a current php update, the update fails with the following error which seems to loop for ever

Code:
Trying to make php...
Generating phar.phar
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php)
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/lib/libxslt.so.1)
make: *** [ext/phar/phar.phar] Error 1
Trying to make php...
Generating phar.phar
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php)
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/lib/libxslt.so.1)
make: *** [ext/phar/phar.phar] Error 1
Trying to make php...
Generating phar.phar
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php)
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/lib/libxslt.so.1)
make: *** [ext/phar/phar.phar] Error 1
Trying to make php...

I have built libxml2 and libxslt. Any help please appreciated.

Thank you


Jonathan
 
The newest version of libxml2 is 2.9.2, so maybe try to set new_xml2=yes in options.conf and recompile libxml2 and libxslt and php
 
Thanks. But I have new_xml2=yes and get same errors. libxml2-2.9.2.tar.gz is downloaded. I have rebuilt libxml2, libxslt but php still fails with same error.
 
Do you have a folder starting with the name "php" in custombuild directory at /usr/local/directadmin/custombuild/ ? If so, delete the php folder and try to recompile php again.

Other then this, I am sorry I don't have a idea. If this was not the problem, then hopefully someone else can help ...
 
Thanks for your input ditto. But no, no php folder in custombuild. Anyone else got any ideas?
 
Maybe try to run:

Code:
ldconfig

then recompile again

Code:
./build update
./build libxml2
./build libxslt
./build php n
 
Hi ditto. That didn't help. I think I have found the problem but not sure of proper way to solve it.

in the error message

Trying to make php...
Generating phar.phar
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php)
/usr/local/directadmin/custombuild/php-5.6.14/sapi/cli/php: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/lib/libxslt.so.1)
make: *** [ext/phar/phar.phar] Error 1

php is looking for lib here /usr/lib64/libxml2.so.2 which is symlink to libxml2.so.2.7.6

But libxml2.so.2.9.2 is installed by custombuild in /usr/local/lib/libxml2.so.2.9.2 and usr/local/lib/libxml2.so.2 is a symlink to it.

Any suggestions on how can I put this right without breaking everything and coming unstuck in later updates?

Thank you


Jonathan
 
Last edited:
What I would have done, is first do "yum remove libxml2", to be sure there is no libxml2 installed with yum. Then I would search for all folders and files containing "libxml2" and delete them, all of them. Then do

Code:
./build update
./build libxml2
./build libxslt
ldconfig
./build php n
 
What I would have done, is first do "yum remove libxml2", to be sure there is no libxml2 installed with yum. Then I would search for all folders and files containing "libxml2" and delete them, all of them. Then do

Code:
./build update
./build libxml2
./build libxslt
ldconfig
./build php n

and also make sure that your ld.so.conf file includes /usr/local/lib :

Code:
[root@sv ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
 
What I would have done, is first do "yum remove libxml2", to be sure there is no libxml2 installed with yum. Then I would search for all folders and files containing "libxml2" and delete them, all of them. Then do

Code:
./build update
./build libxml2
./build libxslt
ldconfig
./build php n

You should not remove the default libxml2 package as it can break many packages on your OS!

You just need to make sure that your ld.so.conf file includes /usr/local/lib :

Code:
[root@sv ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib

and then run

Code:
./build update
./build libxml2
./build libxslt
ldconfig
./build php n
[
 
Back
Top