Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I'm running a server (IBM Xseries) with CentOS 4.2.
I suspect (fear) the RPM database is corrupt because "rpm -qa" gives no output and "rpm -q {known installed rpm}" gives package is not installed message.
I can not install/upgrade any rpms as it fails on all dependencies. Other than the rpm problem the server seams to be functioning correctly.
Is there anyway of resolving rpm issue, without needing a reinstall?
rpmbuilddb this finishes almost instantly
Not good. Copy backup over /var/lib/rpm, delete __db.00? files then run again with (a couple of) -v's and redirect output to file add "2>&1|tee logfile". Luckily you made backups? Else if you still have /var/log/rpmpkgs or equivalent then we could --initdb and then add all with --justdb and be done with it.
I don't have a backup or the /var/lib/rpm dir prior to problems!
rpmpkgs is empty but if I install rpm with nodeps (a package that is already installed) it appears in this file. rpmpkgs.1 .2 .3 .4 contain a list of the packages installed and are all identical.
So if I run "rpm --initdb --justdb" do I need to remove the __db.00? files, do I need to do anything with the rpmpkgs files?
rpmpkgs.1 .2 .3 .4 contain a list of the packages installed and are all identical.
Then check rpmpkgs.1.gz if there are no obvious rpm's missing. After that make all installed rpm's available either on disk in one directory or on removable media. Then test this:
Do note:
- Since I don't know where you will have those rpm's I used "find" which inarguably makes the script much slower.
- You will have to replace the "/var/log/rpmpkgs.1.gz" placeholder for the report that has the most complete record of rpms installed.
- You will have to replace the "/some/dir/" placeholder for the directory the rpm's reside in or mountpoint. If you insist on using a mountpoint then you will encounter an error when the rpm cannot be found on that disk. In that case you'll just have to run the script for each of the other disks.
- Output goes to the bitbucket, so "tee" output to a logfile to be able to resolve errors later on.
When the run finishes w/o significant problems remove the "--test" flag and run for real. As always: YMMV(VM)
May I know if the problem has been resolved...? I experienced exactly the same problem...unluckily on my mail server..I have searched through the internet couldnt find anyone else facing the same problem....Thanks Mr Uspawn for directing me to this thread...
I still have the /var/lib/rpm backup, but the content is somehow weird, inside the rpm folder there are only these:
Basenames __db.001 __db.002 __db.003 Name Packages Providename Pubkeys
seems liek many things are missing....
Stess~ even the way it happened was exactly mysterious like what happened to jugglingphil....it happened when i tried to uninstall the clamav and install again...just a normal operation....
please help if possible....thanks ....for taking time reading my thread ...
Hi
At the moment I'm unsure as the server is Live at a customer site. I'm due to replace the servers shortly, then I'll be able bring the problem server back to my office and amend the server with confidence.
I'm not sure what triggered the situation, but it sounds strange that un-installing and installing clam could do it (something a lot of us do frequently).
Hopefully I'll be able to undate next week, sorry if this isn't soon enough.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.