This blog post is a collection of Yum/RPM errors and their resolutions on Fedora. They may not be happened on me, so I can ensure that does work or will the resolutions be harmful.

Error
Loaded plugins: refresh-packagekit
rpmdb: Thread/process 3198/3087034048 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30975)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
[snip]
TypeError: rpmdb open failed
Resolution [1, 2]
rm -f /var/lib/rpm/__db*
db45_verify /var/lib/rpm/Packages
rpm --rebuilddb
yum clean all
yum update