CentOS下 Yum 损坏与重建

参考文献:

https://www.cnblogs.com/itxdm/p/restore_yum.html

 

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

最新回复(0)
/jishugk92U4fHuQG_2FlKlprgUGXeLyKieDgOf3obj0tfOF45k_3D4794551
8 简首页