[RESOLVED] Messed up...BAD, looking for help!

General support questions
Post Reply
rsjackal
Posts: 7
Joined: 2015/12/13 22:02:43

[RESOLVED] Messed up...BAD, looking for help!

Post by rsjackal » 2018/03/12 12:32:17

Hi Board, been a long time :D

So I decided I needed to update my system which was running 7.3.1611 or something like that, yum update gave me some errors, which I don't have in front of me, I realize that makes this REALLY hard to help......, But one of them was something about apr.* was in conflict, I found an article that said I could RPM -E or something (remove/delete) the file, and that worked for them, so I did it, and voila that error went away.....

But a new one showed up the same error but this time with the file libdb*, so naturally being the idiot I am, I ran the same command rpm -e or something, and then suddenly running yum doesn't work at all, nor does running rpm, they give an error like

missing libdb-4.5.so, the system still works except for a few needed utils such as Postfix email server (Yeah I need that one), and of course yum and rpm (very much needed).

I saw one post, and if I can find it again, I will repost here, as it showed the exact same errors, and symptoms I'm seeing, which may help you awesome people help me, unfortunately that article insinuated that person may have no options other than a new install, ugh, I hate to think I have NO choice with Linux, except a system reinstall, and HOURS of work to recreate everything, DNS, DHCP, HTTP(S), Postfix (with DMARC/SPF, etc.....),blah, blah.

Thanks in Advance!

Ok, so not the exact article, and not EXACTLY the same errors (package name/numbers likely different), but this is effectively what I did, and what I'm experiencing:

Ok, I messed up my yum/rpm utilities in Centos. when i try running either or, with any and all files or options, i receive the following errors every time:

yum:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

libdb-4.7.so: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Sep 11 2012, 08:34:23)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq


and with rpm:
rpm: error while loading shared libraries: libdb-4.7.so: cannot open shared object file: No such file or directory


this all started when i, perhaps foolishly, issued the following command:
rpm -e db4-4.7.25-17.el6.x86_64 --nodeps

which i did while i was trying to fix a dependency problem i was having with installing other packages.

what to do? so far i tried copying the file stated as missing into the directories /lib and /usr/lib. i got the file from online sourceforge location. not sure what else to try doing.

thanks everyone.
Last edited by rsjackal on 2018/03/14 01:34:22, edited 3 times in total.

User avatar
avij
Forum Moderator
Posts: 2577
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Messed up...BAD, looking for help!

Post by avij » 2018/03/12 12:50:07

I don't think CentOS 7 uses libdb-4.5.so.

In any case, you can still fix this by copying the missing library files from some other CentOS installation. Concentrate on making rpm/yum usable first. When they work, you can use yum reinstall pkgname to reinstall any missing files.

rsjackal
Posts: 7
Joined: 2015/12/13 22:02:43

Re: Messed up...BAD, looking for help!

Post by rsjackal » 2018/03/12 12:54:52

Ahhh, thank you for "rattling my cage", I can certainly do a minimal install, and copy what is missing from that one...Hadn't even considered that!

User avatar
TrevorH
Forum Moderator
Posts: 23033
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Messed up...BAD, looking for help!

Post by TrevorH » 2018/03/12 14:35:12

This looks like CentOS 6 not 7.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

rsjackal
Posts: 7
Joined: 2015/12/13 22:02:43

Re: Messed up...BAD, looking for help!

Post by rsjackal » 2018/03/13 00:41:14

ok, so now I'm on the Box:

Code: Select all

# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core)

Code: Select all

yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   libdb-5.3.so: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Nov  6 2016, 00:28:07) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

Code: Select all

rpm -qa
rpm: error while loading shared libraries: libdb-5.3.so: cannot open shared object file: No such file or directory
Hopefully this clears up the mud :)

And this would be the little gem that caused the problem:

Code: Select all

# rpm --erase --nodeps libdb

User avatar
TrevorH
Forum Moderator
Posts: 23033
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Messed up...BAD, looking for help!

Post by TrevorH » 2018/03/13 07:21:03

Download libdb-5.3.21-21.el7_4.x86_64 from a CentOS mirror on another machine, use rpm2cpio libdb-5.3.21-21.el7_4.x86_64 | cpio -idm to unpack it while in a temporary directory with nothing else in it, tar that up and copy it to your broken machine and unpack it there and copy the files to their intended locations. Once rpm and yum function, use yum install to install libdb again.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

rsjackal
Posts: 7
Joined: 2015/12/13 22:02:43

Re: Messed up...BAD, looking for help!

Post by rsjackal » 2018/03/13 12:32:59

TrevorH wrote:Download libdb-5.3.21-21.el7_4.x86_64 from a CentOS mirror on another machine, use rpm2cpio libdb-5.3.21-21.el7_4.x86_64 | cpio -idm to unpack it while in a temporary directory with nothing else in it, tar that up and copy it to your broken machine and unpack it there and copy the files to their intended locations. Once rpm and yum function, use yum install to install libdb again.
Most Excellent, thank you TrevorH! I am rather limited on available time until the weekend, I am excited to complete this. I fully expect that it will resolve the issue. This would be why anything other than Linux is well, just garbage, the people in the communities! From Gentoo to Debian to CentOS, I ALWAYS find help, even though, I cause either by action, or lack of knowledge my own problems about 100% of the time.

I will post the results on completion, and mark accordingly.

rsjackal
Posts: 7
Joined: 2015/12/13 22:02:43

Re: Messed up...BAD, looking for help!

Post by rsjackal » 2018/03/14 01:33:53

As Expected, all is functional again, Thanks again TrevorH! Marking as [RESOLVED]

Post Reply