Follow me on GitHub

CentOS下 Yum 损坏与重建

yum报错error: rpmdb open failed

这种情况一般是由于rpm数据库被损坏导致的可按照下述方法重建yum数据库:

  1. cd /var/lib/rpm/
  2. rm -rf __db.*
  3. rpm –rebuilddb
  4. yum clean all

 

yum 重建 用于无法恢复情况下:

  1. cat /etc/issus
  2. rpm -qa |grep release
  3. 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

 

posted @ 2016-09-16 16:06  季文康  阅读(4844)  评论(0编辑  收藏