因为需要安装:

yum -y install epel-release

提示源没有找到,于是删除

/etc/yum.repos.d  目录下的所有文件,下载阿里的源:

wget http://mirrors.aliyun.com/repo/Centos-7.repo

进行

yum makecache

报错,其实就是找不到XML文件的原因:

[root@centos-rpi3 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
http://mirrors.aliyun.com/centos/7/os/armhfp/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article

解决方式:

编辑Centos-7.repo文件:

将:

http://mirrors.aliyuns.com/centos/$releasever/os/$basearch/

更改为:
http://mirrors.aliyuncs.com/centos/$releasever/os/x86_64/

存盘,重新执行

yum makecache

成功

 

posted on 2019-01-10 15:17  奔跑的鸵鸟2018  阅读(991)  评论(2)    收藏  举报