yum doesn't have enough cached data to continue(yum没有足够的缓存数据来继续)已解决

Centos用yum安装东西时遇到如下头疼的问题

实际上是yum没有足够的缓存数据来继续安装了yum doesn't have enough cached data to continue(yum没有足够的缓存数据来继续)已解决
我们需要解决:修改默认yum源为阿里云yum源 的问题就行了
第1步:备份原有yum源:

mv /etc/yum.repos.d /etc/yum.repos.d.bak

第2步:创建yum源目录

mkdir /etc/yum.repos.d

第3步:下载阿里云yum源配置

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

第4步:重建yum缓存

yum clean all
yum makecache

这样就可以继续开心的使用yum来安装了