樹莓派CENTOS的源更換后一直沒有辦法更新


因為需要安裝:

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

成功

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM