If you have received an error when you update your system packages or a install any new package using yum command,

# yum install update

rpmdb: Thread/process 18696/139825416677120 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

Open the below directory and remove db files,
 
# cd /var/lib/rpm/

you need to remove the db files and execute the yum command,
 
#  rm  __db* 

rm: remove regular file `__db.001′?  y
rm: remove regular file `__db.002′?  y
rm: remove regular file `__db.003′?  y
rm: remove regular file `__db.004′?  y

or
 
#  rm  -rf  __db*  

Now, you can try to install,
 
# yum install update

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nbrc.ac.in
 * epel: mirror.nus.edu.sg
 * extras: mirror.nbrc.ac.in
 * updates: centos.excellmedia.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bc.x86_64 0:1.06.95-1.el6 will be installed