因為需要安裝:
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
成功