LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   multiple installs of same package in RPM database (https://www.linuxquestions.org/questions/fedora-35/multiple-installs-of-same-package-in-rpm-database-175727/)

kamdh 04-28-2004 07:44 PM

multiple installs of same package in RPM database
 
System: Fedora Core 1, with upgraded packages

I installed Quake 2 with the --force command (accidentally installing it multiple times), because I wouldn't need the required libs... bad idea, but anyway, now I can't remove the package since there are multiple installs of the same Quake 2 rpm. I tried a rpm query:

[kam@charon kam]$ rpm -q quake2
quake2-3.20-glibc-6
quake2-3.20-glibc-6
quake2-3.20-glibc-6

So, I tried:

[kam@charon games]$ sudo rpm -e --allmatches quake2
[kam@charon games]$ sudo rpm -q quake2
quake2-3.20-glibc-6
quake2-3.20-glibc-6
quake2-3.20-glibc-6

The "rpm -e" command never returns anything. Now, the problem with this is, I can't use apt-get to install anything new. I tried manually deleting /usr/local/games/quake2, and the same errors occur without the directory in place. Is there any way to remove the entries from the rpm database (since all of the actual files are gone) so apt-get will work?

Thank you.

jon-do 04-29-2004 09:04 AM

No sure if it will make any difference but, try
#rpm -e --nodeps --allmatches quake2

kamdh 04-29-2004 03:28 PM

No, the same thing happened.

kamdh 04-29-2004 03:30 PM

Is there any way to just get rpm to think the packages aren't there, ie. remove the packages' database entries manually? I looked at /var/lib/rpm/Packages but it looked binary.

jon-do 04-29-2004 04:56 PM

one last thing to try
#rpm -e --nodeps --allmatches quake2-3.20-glibc-6

If that doesn't work then, I have to idea :scratch:

I am not sure if you can use synaptic to remove it. If you have it already try it, if not grap one from a Fedora Core 1 repository and install it through rpm and give it a shot

kamdh 04-29-2004 05:38 PM

[kam@charon kam]$ rpm -e --nodeps --allmatches quake2-3.20-glibc6
error: package quake2-3.20-glibc6 is not installed
[kam@charon kam]$ rpm -e --nodeps --allmatches quake2-3.20
error: package quake2-3.20 is not installed

Rpm doesn't seem to recognize the full package name, but when the command is issued on 'quake2' alone, it never gives any error.

Synaptic also returns an error when I try to delete the broken package. However, I just noticed an 'expert' tab where you can select a specific version. But when I click on the '3.20-glibc-6' option, the window flashes and the 'not installed' option becomes checked. Upon further investigation, when the package is viewed before 'remove' is clicked, the correct version is selected, but once 'remove' is clicked, it changes to 'not installed'. Maybe synaptic doesn't like trying to remove multiple versions or something....

Thank you, jon-do, and any additional help would be appreciated.

kamdh 04-29-2004 05:48 PM

Okay, I tried this thinking it might work... I added the following to my apt.conf in the RPM section:

Ignore { "^quake2$" };

It doesn't seem to do anything. Is there someplace in apt's configuration where I could get it to ignore Quake?

kamdh 04-29-2004 05:56 PM

Maybe this will help too...

[kam@charon examples]$ sudo rpm -e --allmatches -vv quake2
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# 500 Header sanity check: OK
D: read h# 674 Header sanity check: OK
D: read h# 687 Header sanity check: OK
D: ========== --- quake2-3.20-glibc-6 i386-Linux 0x0
D: opening db index /var/lib/rpm/Requirename rdonly mode=0x0
D: ========== --- quake2-3.20-glibc-6 i386-Linux 0x0
D: ========== --- quake2-3.20-glibc-6 i386-Linux 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:
D: i dev bsize bavail iavail mount point
D: 0 0x0306 4096 490082 569042 /
D: 1 0x0002 1024 0 -1 /proc
D: 2 0x0006 1024 0 -1 /dev/pts
D: 3 0x0007 1024 0 -1 /proc/bus/usb
D: 4 0x0303 1024 43259 14017 /boot
D: 5 0x0009 4096 31823 31822 /dev/shm
D: 6 0x0302 8192 10085 -1 /mnt/win
D: 7 0x0009 4096 31823 31822 /dev/shm
D: 8 0x000a 4096 0 -1 /proc/sys/fs/binfmt_misc
D: sanity checking 3 elements
D: computing 282 file fingerprints
D: computing file dispositions
D: opening db index /var/lib/rpm/Basenames create mode=0x42
D: ========== --- quake2-3.20-glibc-6 i386-Linux 0x0
D: erase: quake2-3.20-glibc-6 has 94 files, test = 0
D: opening db index /var/lib/rpm/Name create mode=0x42
D: read h# 687 Header sanity check: OK
D: ========== --- quake2-3.20-glibc-6 i386-Linux 0x0
D: erase: quake2-3.20-glibc-6 has 94 files, test = 0
D: read h# 674 Header sanity check: OK
D: ========== --- quake2-3.20-glibc-6 i386-Linux 0x0
D: erase: quake2-3.20-glibc-6 has 94 files, test = 0
D: read h# 500 Header sanity check: OK
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages

It seems like rpm is doing something...

kamdh 04-29-2004 05:59 PM

sudo rpm -e -vv --allmatches --nodeps --noscripts --notriggers quake2

Got it! I decided to just set every option rpm's man page said was possible for erasing, and sure enough, it worked. Thank you man!

Ehtetur 05-15-2009 02:00 PM

I had issues removing a badly installed rpm and this fixed my problem...

Pretty cool that a fix posted in 2004 is still valid 5 years later

s1rc0 10-15-2015 08:18 AM

Quote:

Originally Posted by Ehtetur (Post 3542120)
I had issues removing a badly installed rpm and this fixed my problem...

Pretty cool that a fix posted in 2004 is still valid 5 years later

is still valid 11 years later ;)


All times are GMT -5. The time now is 10:42 PM.