yum报错error: rpmdb open failed
这种情况一般是由于rpm数据库被损坏导致的,可按照下述方法重建yum数据库:
-
cd /var/lib/rpm/
-
rm -rf __db.*
-
rpm –rebuilddb
-
yum clean all
yum 重建 用于无法恢复情况下:
-
cat /etc/issus
-
rpm -qa |grep release
-
arch
rpm -Uvh http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-8.el6.centos.12.3.x86_64.rpm
rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm