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 07-05-2003, 04:51 AM   #1
fettouhi
Member
 
Registered: Jun 2003
Distribution: Arch Linux i686
Posts: 67

Rep: Reputation: 16
Question about rpm packages


I've installed an rpm package using the

rpm -i <package-name>

and I accendently removed it manually, so I want to reinstall it but I get the message

package already installed and if try to remove with

rpm -e <package-name>

i get the message package not installed.

My question is then, is there a way around this problem, i.e. how can I remove the rpm so my linux will know it is not there anymore so that I can reinstall it.

Regards

André Fettouhi
 
Old 07-05-2003, 10:31 AM   #2
parsecbyproxy
LQ Newbie
 
Registered: Jun 2003
Location: SC, USA
Distribution: Gentoo >=1.4
Posts: 13

Rep: Reputation: 0
I would try rebuiding rpm's database, by:

# rm -f /var/lib/rpm/__db*
(to remove the old database files)

# rpm -v --rebuilddb
(to rebuild the database--which may take a long time)

If you get a message that the resource is in use, kill rpm first then go back through those two lines. Then:

$ rpm -q <package_name>

(make sure you are searching by package name and not by original installer name, e.g. do $ rpm -q evolution, not $ rpm -q evolution-1.2.2.i386.rpm.)

Then:

# rpm -e <package_name>

and

# rpm -i <package_name>
 
Old 07-06-2003, 03:39 AM   #3
fettouhi
Member
 
Registered: Jun 2003
Distribution: Arch Linux i686
Posts: 67

Original Poster
Rep: Reputation: 16
Thanks for the reply but how do I kill rpm because it says "resource busy".

Regards

André Fettouhi
 
Old 07-06-2003, 11:18 AM   #4
parsecbyproxy
LQ Newbie
 
Registered: Jun 2003
Location: SC, USA
Distribution: Gentoo >=1.4
Posts: 13

Rep: Reputation: 0
If rpm is truly busy, then you can do:

$ su
# ps
# kill [ some-pid ]

When you input ps, it will give you a list of currently running executable processes, along with their PIDs or Process IDs. Find which one rpm is using, say it's 1234 in this case, and replace [ some-pid ] with 1234, e.g. :

# kill 1234

And then try rebuilding the database again...
 
Old 07-06-2003, 02:28 PM   #5
fettouhi
Member
 
Registered: Jun 2003
Distribution: Arch Linux i686
Posts: 67

Original Poster
Rep: Reputation: 16
Thanks again

I did as you said and killed rpm but when I rebuild the database I get a strange error message

error: db4 error(16) from dbenv->remove: Device or resource busy

Any idea what that means???

Kind Regards

André Fettouhi
 
Old 07-06-2003, 04:38 PM   #6
parsecbyproxy
LQ Newbie
 
Registered: Jun 2003
Location: SC, USA
Distribution: Gentoo >=1.4
Posts: 13

Rep: Reputation: 0
No... I don't know what that means, though it has been dealt with before at linuxquestions.org:

http://www.linuxquestions.org/questions/history/43802

and apparently they found a bug... Redhat says:

http://www.redhat.com/advice/ask_shadowman.html

Which should (temporarily) fix the problem...



########## EDIT ###########
I should have looked a bit further, read this article before the other Redhat one (a bug and harmless?):

http://rpm.redhat.com/hintskinks/repairdb/

Last edited by parsecbyproxy; 07-06-2003 at 04:42 PM.
 
Old 07-07-2003, 06:55 AM   #7
fettouhi
Member
 
Registered: Jun 2003
Distribution: Arch Linux i686
Posts: 67

Original Poster
Rep: Reputation: 16
Once again many thanks for your swift reply. The link helped, it's a bug in the rpm and should be fixed in the next release.

Kind Regards

André Fettouhi

 
  


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
Noob question regarding rpm packages for Suse 64bit Zzorrkk SUSE / openSUSE 6 11-27-2004 05:10 PM
Question about rpm packages plumba Linux - Software 4 08-14-2004 05:08 PM
RPM 'failed dependencies': Why can I not install any rpm packages? leontini Linux - Newbie 7 09-16-2003 12:44 AM
error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages inward_eye Linux - Software 3 08-24-2003 03:07 PM
creating packages (.tgz/.deb/.rpm) How from the source packages? l_9_l Linux - General 1 03-06-2002 06:03 PM

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

All times are GMT -5. The time now is 01:30 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