yum命令无效

  无论执行任何yum命令都无效,弄了两个小时。主要的方案有:

方案1:yum clean all 并查询repo中是否有enabled=0: https://unix.stackexchange.com/questions/298110/centos-7-yum-install-not-working

方案2:/etc/yum.conf 中添加

http_caching=packages

方案3:

rm -f /var/lib//rpm/__db*
rpm --rebuilddb

方案4:

  重启VPS

方案5: yum卸载重装

呵呵。。。


原文地址:https://www.cnblogs.com/alan2kat/p/7771942.html