树莓派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