I am getting this error while doing a yum update on CentOS 6.
rpmdb: /var/lib/rpm/Basenames: unexpected file type or format
Pretty simple one to solve. Just needed to rebuild the database.
rpm -vv --rebuilddb