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 |
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> |
Thanks for the reply but how do I kill rpm because it says "resource busy".
Regards André Fettouhi |
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... |
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 |
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/ |
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 :D :D :D |
All times are GMT -5. The time now is 06:25 AM. |