yum Error: rpmdb open failed [How to Solve]

yum Error: rpmdb open failed
Solution:

cd /var/lib/rpm/;for i in `ls | grep 'db.'`;do mv $i $i.bak;done;rpm --rebuilddb;yum clean all;


Read More: