you make look into /var/lib/rpm
then delete all those junk files like db__01.blabla
> I ran into this problem with Mandrake 9.1 (RPM 4.0.4) last week. I'm
> happy to share the summary of all the things that I've done to fix the
> problem.
>
> PROBLEM: rpm -qa hangs1
>
> # ps -f -C rpmq
> UID PID PPID C STIME TTY TIME CMD
> root 27495 30729 0 13:25 pts/6 00:00:00 /usr/lib/rpm/rpmq -q --all
> # strace -p 27495
> select(0, NULL, NULL, NULL, {0, 80000}) = 0 (Timeout)
> select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
> select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
> select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
> select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
> select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
>
> SOLUTION:
> rm -f /var/lib/rpm/__db* (remove stale locks)
>
>
> PROBLEM: rpm database has damaged header instance
> IMPACT:
>
> 1. rpm -qa segfaults
> 2. rpm --rebuilddb segfaults
> 3. rpm -ivh spews these error messages:
> rpmdb: Overflow page 5380 of invalid type
> error: db4 error(-30979) from db->verify: DB_VERIFY_BAD: Database
> verification failed
>
> 4. rm -f /var/lib/rpm/__db*; db_verify /var/lib/rpm/Packages
> db_verify: Overflow page 5380 of invalid type
> db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification
> failed
>
>
> SOLUTION:
> 1. run rpm -qa. note the last displayed rpm before the segfault.
> this causes the problem (at least in my case).
> 2. cd /var/lib/
> 3. tar czvf /tmp/rpmdb.tar.gz rpm (backup)
> 4. cd rpm
> 5. rm -f /var/lib/rpm/__db*
> 6. mv Packages Packages.orig
> 7. install db4-utils package
> 8. db_dump Packages.orig | db_load Packages
> 9. download pre-compiled binary of rpm 4.1 from
> ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/rpm-4.1.i386.tar.gz
> and untar it to a temporary directory
> 10. run rpm --rebuilddb -vv using rpm 4.1 (problem header will be
> skipped)
> 11. run rpm --rebuilddb -vv using rpm 4.0.4
> 12. rpm -qa should not segfault
> 13. reinstall the problem rpm
> 14. rm -rf /var/lib/rpmrebuilddb.* (optional)
>
>
> REFERENCES:
> http://rpm.redhat.com/hintskinks/repairdb/
> http://www.ale.org/archive/ale/ale-2002-03/msg00063.html
> http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=99136
> http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=57684
>
> --
> $_=q:; # SHERWIN #
> 70;72;69;6e;74;20;
> 27;4a;75;73;74;20;
> 61;6e;6f;74;68;65;
> 72;20;50;65;72;6c;
> 20;6e;6f;76;69;63;
> 65;27;:;;s=~?(..);
> ?=pack q$C$,hex$1;
> ;;;=egg;;;;eval;;;
> --
> Philippine Linux Users' Group (PLUG) Mailing List
> [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
> Official Website: http://plug.linux.org.ph
> Searchable Archives: http://marc.free.net.ph
> .
> To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
> .
> Are you a Linux newbie? To join the newbie list, go to
> http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
>
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie