Attention: Linux RPM experts
Issue: Can not uninstall RPM by just providing the name. Multiple instances of RPM pkg getting installed.
I am using RedHat EL3.0, kernel 2.4.21-4.
While trying to uninstall a driver RPM, it doesnt get uninstalled if only the package name is provided. The entire package name along with version numbers has to be provided, for it to be uninstalled.
If I do rpm -e pkg, no error is shown and I get the prompt immediately, but the package doesnt get uninstalled.
If I do rpm -e pkg-1.8.60-1, the package gets correctly uninstalled.
rpm -evv pkg gives me the following messages and returns the prompt without uninstalling the package:
-----------------------------------------------------
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
-----------------------------------------------------
The first few lines that I get on doing rpm -evv pkg-1.8.60-1 are (this successfully uninstalls the package):
-----------------------------------------------------
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: read h# 2639 Header SHA1 digest: OK (f2f7106dfbb760c2e92a09afbe67fabb05e7fd4b)
D: ========== --- pkg-1.8.60-1 i386-linux 0x0
D: opening db index /var/lib/rpm/Requirename rdonly mode=0x0
D: closed db index /var/lib/rpm/Requirename
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages create mode=0x42
D: mounted filesystems:
-----------------------------------------------------
Another seemingly related problem is:
Since pkg doesn't get uninstalled, under some circumstances, multiple instances of the package also get installed when I try rpm -i pkg-1.8.60-1-i386.rpm.
When this happens and I do rpm -qa| grep pkg, I get pkg-1.8.60-1 pkg-1.8.60-1 pkg-1.8.60-1 pkg-1.8.60-1
Anyone has any idea why I cant uninstall pkg by just providing the name? Also, why/how are multiple instances of pkg getting installed?
RPM
Monday, August 2, 2004
RTFM.
Look at the source & figure it out.
Yada.
Yada.
Yada.
/.
Monday, August 2, 2004
Poke around google for something like "rebuilding rpm database". Most likely it was corrupted during an install.
What you'll have to do is wipe the rpm database, rebuild it, and then try your un-install.
This only takes a few minutes on the Redhat P2 200 development box under my desk, so it shouldn't take much.
This is the equivalent of rebuilding the Windows registry by actually checking to see what's installed...
KC
Monday, August 2, 2004
Building the RPM database solved the problem. Thanks for the suggestions. But still don't know what caused the curruption of the database.
RPM
Tuesday, August 3, 2004
Most likely something died during an install. That's the most common issue.
KC
Tuesday, August 3, 2004
Recent Topics
Fog Creek Home
|