On Saturday 04 February 2006 20:50, Jim Cornette wrote: >Danny Terweij - Net Tuning | Net wrote: >> Hi there, >> >> While running a yum update the hdd did get an error and the system >> was remounted in read only mode. >> >> The error seems gone, but the rpmdb is not fine anymore, i did do >> rpm --rebuilddb >> But now i get weird errors with installing packages, like dupes or >> already installed (but it is not). >> >> >> How do i create a new rpmdb with current installed packages? >> >> Or am i doomed? :) >> >> Danny > >Basically, you have to find the multiple version installed rpms and > use a option to rpm called --justdb. this option will remove only the > database entry for the old nonexistent package entry and then you > could use the -V or --verify option to rpm to ensure the later > installed version is intact. No output should show on the verify. > >Someone on the test list posted this one-line command to allow an > output to the terminal which will detect multiple entries of > packages. The kernel and the gpg-pubkey and any other package that > allows for multiple versions to coexist. If you are running a 64-bit > system, the command will not work well. > >rpm -aq --queryformat "%{NAME}\n" | sort | uniq -c | grep -v -E " *1 " > >For packages that are not actually installed but are in the rpm >database, it might be a tougher issue to deal with. You would need to >run something like 'rpm -qa |grep missing' as root to detect packages >which have missing files. Then you can either download the rpms and > use rpm -Uvh --replacefiles --replacepkgs <package.rpm> >or remove the database entry for the messed up package and do a 'yum >install <package>' on the shortchanged package. Yum should not know it >is installed and install over whatever remained of the package. > >This other suggestions or you're doomed as you stated above. :-) > >Jim > Hmm, jumping in here, that command above returns this: [root@coyote example]# rpm -aq --queryformat "%{NAME}\n" | sort | uniq -c | grep -v -E " *1 " 2 gnome-mag 2 gnome-speech 28 gpg-pubkey 2 kernel 2 perl-Digest-HMAC 2 perl-Digest-SHA1 2 perl-Time-HiRes Frankly, with as much stuff as I've built and installed from tarballs, using either the make install or the checkinstall option, I would have thought the output would have been much more verbose. I use kde, self installed, so those gnome entries could probably be removed. Is there a way to get the versions back from that command automaticly? >-- >The person who can smile when something goes wrong has thought of >someone to blame it on. -- Cheers, Gene People having trouble with vz bouncing email to me should add the word 'online' between the 'verizon', and the dot which bypasses vz's stupid bounce rules. I do use spamassassin too. :-) Yahoo.com and AOL/TW attorneys please note, additions to the above message by Gene Heskett are: Copyright 2006 by Maurice Eugene Heskett, all rights reserved.