问题描述
$ yum install xxx
$ Error: Failed to synchronize cache for repo
$ dnf install xxx
$ Error: Failed to synchronize cache for repo
解决方案
$ cd /etc/yum.repos.d
#之后 查找并删除出现问题的 repo仓库
#若未找到 则打开 CentOS-Base.repo找
$ yum clean all
$ yum makecache
#dnf也像上边一样即可