LinuxQuestions.org
Help answer threads with 0 replies.
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 12-26-2003, 02:37 AM   #1
mansonmuni
Newbie
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 16

Rep: Reputation: 0
Why is rpm broken?


RH9 rpm version 4.2

On several distros I have found the need to rebuild my rpm database. Is this a normally occuring event or do I provoke it? Today I rebuilt it twice! Whenever rpm hangs, it usually results in my having to move my /var/lib/rpm/__db.00* files out of the way and do rpmdb --rebuilddb in order to get it to work again. Tonight, I get this message after I did it:

[root@localhost rpm]# rpmdb --rebuilddb
error: db4 error(16) from dbenv->remove: Device or resource busy

rpm is working but this doesn't sound good. Am I doing the right thing when I have this problem? What are the possible complications of the --rebuilddb option?


rpm had locked up after a simple erase operation. It seems my system indicates there are multiple installations of some packages -- initscripts for example:

[root@localhost rpm]# rpm -q initscripts
initscripts-7.14-1
initscripts-7.28-1

So I try to erase the 7.14 version with rpm -e and it just hangs. Well obviously there aren't really multiple versions of initscripts on my machine, but rpm thinks there are. But it doesn't know how to get rid of what isn't there. After it hangs, its broken. The only way to get it to work again that I know of is to rebuild the db files. It still thinks it has multiple initscripts installed, but at least it works.

Where is rpm getting this erroneous information? Header files? I don't have a initscripts*.hdr file anywhere on my box that I can find.

Why is rpm broken like this? Is it me?
 
Old 12-26-2003, 03:19 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 271Reputation: 271Reputation: 271
"Why is rpm broken like this?"

I think that the problem is that at some time in the past you ended up with multiple registrations of the same rpm package and have never cleaned things up all the way. I have had the problem of multiple registrations before and have a method to clean them out of the rpm data base:

First create a listing of every rpm in the rpm data base:
rpm -qa | sort > /root/every.rpm.txt

Look through every.rpm.txt and find every rpm that appears more than once. Collect the current version of these rpm packages someplace handy. Check to make sure that none of the packages are needed by the rpm package:
rpm -qR rpm

Get rid of the problem rpms by issuing:
rpm --nodeps -e problemname
over and over until rpm tells you that the rpm is not installed

Then install the current version of that rpm with:
rpm -if /handyplace/rpmname.rpm

After you have cleaned out all of the duplicate names then run:
rpm --rebuilddb
and it should do a neat job of rebuilding your data base this time.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 12-26-2003, 04:48 PM   #3
mansonmuni
Newbie
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 16

Original Poster
Rep: Reputation: 0
Ok Steve. Thanks. I'm working on that process. Could take a while since I've got about 1400 packages installed. Nevertheless, I can do it. But what about these kind of entries in my everypackage.txt file:
automake14-1.4p6-5.1
automake15-1.5-6
automake-1.6.3-5

Isn't that three separate entries for automake with some default renaming scheme for duplicates? Shouldn't the 14 and 15 versions be cleaned out too?

What is rpm doing here and why?

Glen
 
Old 12-26-2003, 05:55 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 271Reputation: 271Reputation: 271
"What is rpm doing here and why?"

The version number is to the right of the minus sign. I think that you have three different packages (in the rpm sense) installed:
automake
automake14
automake15

They are not duplicates. The older automakes are there in case you have old packages to install that need the old versions of automake. The differences are explained with:
rpm -qi automake
rpm -qi automake14
rpm -qi automake15

These would be duplicate names:
automake-1.4p6-5.1
automake-1.5-6
automake-1.6.3-5



___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 12-26-2003 at 05:57 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[Fedora 2] tar and rpm broken UnknownFear Linux - Software 2 11-29-2004 03:17 PM
Downgrade glibc when RPM is broken? redwing25 Linux - Software 0 09-24-2004 01:18 PM
RPM broken after install bofallon Linux - Newbie 0 04-22-2004 05:47 PM
rpm is broken wlfdgcrkz Linux - Software 4 05-13-2003 04:54 AM
rpm broken for root? ubien Linux - General 1 01-23-2003 02:07 AM


All times are GMT -5. The time now is 06:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration