Link to home
Start Free TrialLog in
Avatar of Scott Gorcester
Scott GorcesterFlag for United States of America

asked on

Website is offline on CentOS 5.6 Server error is libxml2.so.2: cannot open shared object file: No such file or directory, request assistance repairing this issue.

My customers website is down and our hosting provider says the issue is due to a damaged libxml2. The error is Website is offline on CentOS 5.6 Server error is libxml2.so.2: cannot open shared object file: No such file or directory,

I am looking for options to repair or replace this library.

Scott
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

Does it show installed?

rpm -qa | grep libxml

Can you retrieve it via yum?

yum list | grep libxml

If yes to both, "yum remove libxml2 libxml2-devel" and "yum install libxml2 libxml2-devel", else just install it.
Avatar of Scott Gorcester

ASKER

Hi Jan, thank you for your reply!

 the command rpm -qa | grep libxml just returns me to a prompt and yum list shows me the same error - libxml2.so.2: cannot open shared object file: No such file or directory
Yum is broken due to the issue, I figure I need to find the correct libxml and upload and install it. I am not sure on these steps. I have not found a version of libxml2 for Centos 5.6.

Scott
If you do an rpm -qa | grep libxml2 and it's l isted, then when you install the download, do an "rpm -Uvh --force" on the rpm file.
Its not listed. I am not clear on what libxml to use for centos 5.6 I see centos 5.11 and centos 6.7 versions on the link you sent
You don't want the want for CentOS 6.  Get the one for 5.

Why is yum broken?  What error do you get?
Everything was fine until yesterday when the client discovered their Joomla website was not online. Other Wordpress website works fine. Hosting provider said the libxml2 was broken and thus so is yum. The error when running yum is "libxml2.so.2: cannot open shared object file: No such file or directory,"

At this point I am looking to repair yum to see if this resolves the Joomla site problem. The client said they ran some updates and that is suspected cause at the moment

Scott
yum upgrade yum

see if that works.

Does "rpm -qa | grep libxml2" so an installation?
Well Yum is broken so "yum upgrade yum wont work, it returns the same error

"libxml2.so.2: cannot open shared object file: No such file or directory,"

AS I mentioned above when running "rpm -qa | grep libxml2 simply returns me to a prompt indicating I suspect that the libxml2 is not loaded.

Scott
SOLUTION
Avatar of Nick Upson
Nick Upson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Install the CentOS 5 version of the file from the link.  

rpm doesn't indicate whether a file is loaded -- only if it's installed.

So, you may not need the --force directive to install the rpm file.
I tried to install yum and received dependency errors /usr.bin/python is needed by yum
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The server is a VPS and I do not have immediate access to the DVD, I could probably download a copy and build a centos 5.6 machine here in my lab.

Scott
also seeing this issue

service httpd start
Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: libxml2.so.2: cannot open shared object file: No such file or directory
Centos.org\mirrors download the libxml package, your issue sounds as a corruption because someone removed packages including the -force parameter and that is how one finds oneself in this situation.
Run ldd /usr/bin/yum and fill the missing dependencies.
Once yum us up and running, running  yum update should fix the remaining missing items, including Python, etc.

If I am not mistaken, yum relies on libxml to parse the data.

One should not use -force as a general command argument as one tends to build in Muscle memory always including this argument

If the provider has a snapshot of the vps, rolling it back to the last version that work might be faster.......... Depending whether there are regular changes data being added.........
Arnold, no-one has accessed the server to run a -force parameter. I tried running the command you specify and the response is "not a dynamic executable.

Scott
Which command?
ldd yum?
You have to download and install the libxml rpm for centos 5.x the change in versions deals with security/vulnerability.
Once you restore the yum by reinstalling a dependency a package at a time, or if you can download the entire ISO, then mount it as though it is a file system,
And using the mounted ISO, reinstall/update the vps to make sure there are no broken dependencies st which point everything should start working again, more your installed system is centos 5.6 while the last 5 version is 11 and has been for I think more than four years.......
Yum update to get your vps to the most current version will mitigate how your system was compromised.....
Arnold, since yum is broken "yum update" will not work. I will ask the provider to mount the dvd in the hopes I can upgrade the VPS
I know that yum is currently broken, ldd will identify which other libraries might be missing.
My suggestion for yum update is after all requisite missing/corrupt packages are installed/reinstalled.

You could the DVD to reinstall yum with all the dependencies...........
I hired a contractor to fix this and he was able to delete the lib2 directory and copy fresh library to the proper location.
I've requested that this question be closed as follows:

Accepted answer: 0 points for moosesupport's comment #a41390360

for the following reason:

None of the responses led to a solution so I hired a contractor and paid him to resolve the issue.

Scott
gheist, since you were not a respondent I am unclear why you would object and on what grounds you accuse me of lying. Consultant was hired on Up Work (formerly oDesk) and I paid for 4 hours of work to resolve this issue. Here is the final two entries in our conversation that led to the site being restored to working order.

 
5:29 PM PST, 26 Dec, 2015 Hector C****a move damaged /usr/lib directory to /usr/lib_bak


 5:29 PM PST, 26 Dec, 2015 Hector C****a and move /usr/lib2 fresh library directory to /usr/lib

I will always reward any input that helps solve my issue but in this case none of the responses helped locate and correct my issue.

Thank You

Scott
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Okay I have granted points to all those who offered assistance even tho that assistance did not lead to a solution, thank you for your time, Gheist NO POINTS for you!

Scott