Error rpmdb open failed on running yum update
Facing issues when updating packages on RHEL System? Error logs similar to below log that we encountered on one of our CentOS systems.
error: db5 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db5 – Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:Error: rpmdb open failed
This error occurs when rpm database is corrupted on the system. No need to worry, as there is an easy fix which will be discussed below in simple steps.
Requirements
- Root user access to the Machine
Procedure
- Log in to the machine using root account where you are facing the issue.
- Stash all the headers files on which yum uses for dependency resolution
yum clean headers
- Clean yum packages cache
yum clean packages
- Clean metadata
yum clean metadata
- Clean dbcache
yum clean dbcache
- Clean remaining things
yum clean all
- Remove clean all RPM database files
rm -f /var/lib/rpm/__db.*
- Rebuilt RPM Database
rpm -vv –rebuilddb
- Now run the update command
yum update
With this rpmdb open failed error will be fixed.