On Tue, 4 May 2004, Brian Hankins wrote: > I am having some trouble with rpm upgrades, while installing new > packages works fine. This is what I see when running this: > # rpm -Uvh package.rpm > Segfault > > There is a backstory to this actually. One day I was running the > upgrades as normal through the graphical up2date tool, and I upgraded > something like 6 packages at once. This was about a month and a half ago > when openssl needed an update. When I rebooted, all kinds of stuff began > segfaulting after some research and straces we ended up forcing a > reinstall of the openssl package(just trying to ssh into another machine > was segfaulting as well). After that everything seemed to be working > well, except for rpm which segfaults everytime I try to upgrade a > package, which is hindering me from updating the system. I had something > like this happen in an older version of redhat so I used: > # rpm --rebuilddb > > I was still running into the same issue, and I went to deleted the db files: > # rm /var/lib/rpm/__db* > > The problem still happens, so I grabbed the rpm of rpm from the install > cd and upgraded it with: "rpm -Uvh --force" which ends up displaying the > status hashes like its installing, but segfaults after that point. I > could not find anything beneficial in my investigation in the logs or > and strace of running rpm, granted I am not an expert on it. I would > appreciate any suggestions, or help on a fix or workaround, or what else > I need to look for. Thanks alot. The rpm binary is quite unlikely to be corrupt, reinstalling package doesn't typically "fix it" on Linux :) There's probably something corrupt in the rpmdb, if --rebuilddb doesn't cure it then you can try the alternative method: Take a backup: # cd /var/lib # tar czvf /tmp/rpmdb.tar.gz rpm Do a basic verify of the packages db: # cd /var/lib/rpm # /usr/lib/rpm/rpmdb_verify Packages Repair it: # mv Packages Packages-ORIG # /usr/lib/rpm/rpmdb_dump Packages-ORIG | /usr/lib/rpm/rpmdb_load Packages See if it worked: # rpm -qa If that works ok then rebuild indices: # rpm --rebuilddb ..and you should be ready to go. If it still segfaults file a bug to bugzilla. - Panu -