1, Prerequisites: When the package was installed, I manually terminated (possible cause of error)
[email protected] yum.repos.d]# Yum Clean all
rpmdb:thread/process 4541/140619363587840 Failed:thread died in Berkeley DB library
error:db3 Error ( -30974) from Dbenv->failchk:db_runrecovery:fatal error, run database recovery
Error:cannot Open Packages index using DB3-( -30974)
error:cannot Open Packages database in/var/lib/rpm
CRITICAL:yum.main:
Error:rpmdb Open Failed
[email protected] yum.repos.d]# Yum Makecache
rpmdb:thread/process 4541/140619363587840 Failed:thread died in Berkeley DB library
error:db3 Error ( -30974) from Dbenv->failchk:db_runrecovery:fatal error, run database recovery
Error:cannot Open Packages index using DB3-( -30974)
error:cannot Open Packages database in/var/lib/rpm
CRITICAL:yum.main:
2, according to the prompt can know that the RPM database is damaged, if the following method to rebuild
[Email protected] yum.repos.d]# cd/var/lib/rpm/
[[email protected] rpm]# ls
basenames __db.004 Name pubkeys triggername
conflictname dirnames obsoletename requirename
__db.001 filedigests Packages requireversion
__db.002 Group providename sha1header
__db.003 installtid provideversion Sigmd5
[Email protected] rpm]# RM __db.*-RF
[Email protected] rpm]# rpm--REBUILDDB
[email protected] rpm]# Yum Clean all
Loaded plugins:aliases, Changelog, Downloadonly, Kabi , Presto, Product-id,
: Refresh-packagekit, Security, Subscription-manager, Tmprepo,
: Verify, Versionlock
Updating certificate-based repositories.
unable to read consumer identity
Loading support for Red Hat kernel ABI
Cleaning Repos:rhel-source
Cleaning up everything
0 delta-package files removed, by Presto
[[email protected] rpm]# Yum update
Loaded plugins:aliases, Changelog, Downloadonly, Kabi , Presto, Product-id,
: Refresh-packagekit, Security, Subscription-manager, Tmprepo,
: Verify, Versionlock
Updating certificate-based repositories.
unable to read consumer identity
Loading support for Red Hat kernel ABI
Rhel-source | 4.0 KB 00:00 ...
rhel-source/primary_db | 3.1 MB 00:00 ...
Setting up Update Process
No Packages marked for Update
Rpmdb Open Failed Solution