Avatar of Scott Gorcester
Scott Gorcester
Flag 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
LinuxApache Web ServerWeb ServersLinux Distributions

Avatar of undefined
Last Comment
Scott Gorcester

8/22/2022 - Mon
Jan Bacher

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.
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
Scott Gorcester

ASKER
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
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Jan Bacher

Jan Bacher

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.
Scott Gorcester

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Jan Bacher

You don't want the want for CentOS 6.  Get the one for 5.

Why is yum broken?  What error do you get?
Scott Gorcester

ASKER
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
Jan Bacher

yum upgrade yum

see if that works.

Does "rpm -qa | grep libxml2" so an installation?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Scott Gorcester

ASKER
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
Nick Upson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Jan Bacher

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.
Scott Gorcester

ASKER
I tried to install yum and received dependency errors /usr.bin/python is needed by yum
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Jan Bacher

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Scott Gorcester

ASKER
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
Scott Gorcester

ASKER
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
arnold

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.........
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Scott Gorcester

ASKER
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
arnold

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.....
Scott Gorcester

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
arnold

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...........
Scott Gorcester

ASKER
I hired a contractor to fix this and he was able to delete the lib2 directory and copy fresh library to the proper location.
Scott Gorcester

ASKER
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
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Scott Gorcester

ASKER
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
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Scott Gorcester

ASKER
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