LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 09-13-2006, 01:26 AM   #1
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Rep: Reputation: 30
trying to fix broken rpm command


Dear friends,


I have a rhel3 server which cannot do any rpm command. I have posted a thread at http://www.linuxquestions.org/questi...d.php?t=461646

I haven't resolve the issue. But anyway, i wish to try to use the rhel3 rescue cd to start the rpm command from cd.
But i got a few things which worry me.

Currently there is a clamav rpm running fine on the server, but due to update requirement, i need to uninstall the rpm based clamav and install newer version. but as described by the thread from above, the rpm command on the server no longer work. My aim now is to use the rescue cd to boot and then use the run the rpm command from cd to uninstall currently used clamav, then install newer version of clamav rpm onto it. If its successful, i hope so....then will be great...

but I am wondering if i can solve the problem that way....because i think the /var/lib/rpm folder is in the harddisk, and it is somehow corrupted. And I am not sure if i run a rpm command from rescue cd, will it work if the /var/lib/rpm folder is already corrupted. yet I cannot do any rpm rebuild command on the machine itself because any rpm cannot work anymore.

I couldn't risk and try yet because the machine is a dynamic mail server...if i do it and rpm install and uninstall not work....then the server will not be able to up again...

I just want to get expert opinion if this would help solve the rpm broken command problem and i can try on a simulation before the real installtion can proceed....
I am surprised no one seems to have face the same type of rpm problem like mine before...searched through google and rpm mailing list i can't find anyone with same problem....

please help me with this...thanks a lot for taking time helping..!!

regards
Y
 
Old 09-13-2006, 06:07 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I have a rhel3 server which cannot do any rpm command. (..) I haven't resolve the issue.
Do you have backups that include /var/lib/rpm?


Currently there is a clamav rpm running fine on the server, but due to update requirement, i need to uninstall the rpm based clamav and install newer version.
Should be upgraded (-U).


I am wondering if i can solve the problem that way....because i think the /var/lib/rpm folder is in the harddisk, and it is somehow corrupted. And I am not sure if i run a rpm command from rescue cd, will it work if the /var/lib/rpm folder is already corrupted.
rpm itself (binaries) will work but they need information in the RPM database to perform any install/remove actions. You would use the Rescue CD if you encounter for instance broken or nonexistant libraries that keep rpm from working. Before doing anything else fixing the RPM database is important. I recently did a thread about that here: http://www.linuxquestions.org/questi...d.php?t=475900

Last edited by unSpawn; 09-13-2006 at 06:08 AM.
 
Old 09-14-2006, 02:20 AM   #3
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Original Poster
Rep: Reputation: 30
Hi unSpawn,

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 like many things are missing....

Thanks friend for your attention,

Regards
Y
 
Old 09-14-2006, 04:45 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I still have the /var/lib/rpm backup
Uh. I mean do you have any backups of this box? Like on removable media or another system?
Not /var/lib/rpm. That's the default RPM database location.


but the content is somehow weird, inside the rpm folder there are only these
So you deleted some files? Is that it?

And did you look at the other thread?
 
Old 09-17-2006, 08:28 PM   #5
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Original Poster
Rep: Reputation: 30
Hi Mr UnSpawn,

thanks for your reply.

Quote:
Uh. I mean do you have any backups of this box? Like on removable media or another system?
Not /var/lib/rpm. That's the default RPM database location.
Unfortunately no...i don't have a backup for the qmail box..only one machine...

Quote:
So you deleted some files? Is that it?

And did you look at the other thread?
No, i did not delete anything at all. After i found out the rpm command was broken, i jusst backup the /var/lib/rpm somewhere then i tried those rpm --rebuilddb command, meaning i did not change anything in the /var/lib/rpm. However i believe the /var/lib/rpm is useless because it is a backup after the rpm binary has been corrupted...i do not have the prior corrupted /var/lib/rpm, and seriously i never expect that i need to backup that, but from now one i think i have to backup all my /var/lib/rpm folder in every linux machine.

I did read the other thread, but it was inconclusive. I checked the rpmkpgs log files, it has content in there but i cannot find anything with clamav rpm in there. Its weird cozi have that installed in that machine.

thanks for your help...

Regards
Y
 
Old 09-18-2006, 03:03 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I did read the other thread, but it was inconclusive.
Well it may be inconclusive but at least the thread includes a workaround to reinitialise the database and refill it. See if you can use that. If you have any questions about the procedure prior to executing it, ask here, OK? I don't check the other thread for answers.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fix a debian broken system el_pajaro! Debian 6 06-03-2009 01:23 AM
Aptitude--How to fix broken package kkruecke Debian 1 08-29-2006 03:12 PM
Fonts in games are broken... please help to fix webdevel Linux - Games 2 11-03-2005 04:15 PM
X.ORG Broken... is it possible to fix!? electronique Slackware 19 11-27-2004 05:13 PM
How do I fix a broken Symbolic Link? dickgregory Linux - Newbie 4 11-07-2004 08:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration