yum命令出错: All mirror URLs are not using ftp, http[s] or file解决

报错:

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/addons/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: addons

一.确认网络、防火墙没问题。

二.mirrorlist.txt文件不见了需要extras、base、updates、addons下补齐

1./var/cache/yum/base/mirrorlist.txt url:

http://mirrors.163.com/centos/5.7/os/x86_64/
http://centos.ustc.edu.cn/centos/5.7/os/x86_64/
http://mirror.neu.edu.cn/centos/5.7/os/x86_64/
http://mirrors.ta139.com/centos/5.7/os/x86_64/
http://ftp.nsysu.edu.tw/CentOS/5.7/os/x86_64/
http://ftp.tc.edu.tw/Linux/CentOS/5.7/os/x86_64/
http://ftp.isu.edu.tw/pub/Linux/CentOS/5.7/os/x86_64/
http://ftp.stu.edu.tw/Linux/CentOS/5.7/os/x86_64/
http://ftp.twaren.net/Linux/CentOS/5.7/os/x86_64/
http://ftp.cs.pu.edu.tw/Linux/CentOS/5.7/os/x86_64/
http://mirror01.idc.hinet.net/CentOS/5.7/os/x86_64/
http://centos.mirror.cdnetworks.com/5.7/os/x86_64/
http://centos.tt.co.kr/5.7/os/x86_64/
http://data.nicehosting.co.kr/os/CentOS/5.7/os/x86_64/
http://mirror.khlug.org/centos/5.7/os/x86_64/
http://mirror.yongbok.net/centos/5.7/os/x86_64/
http://ftp.daum.net/centos/5.7/os/x86_64/
http://mirror.nus.edu.sg/centos/5.7/os/x86_64/
http://mirror.averse.net/centos/5.7/os/x86_64/
http://mirrors.sin1.sg.voxel.net/centos/5.7/os/x86_64/

2./var/cache/yum/updates/mirrorlist.txt url:

http://mirror.neu.edu.cn/centos/5.7/updates/x86_64/
http://mirrors.ta139.com/centos/5.7/updates/x86_64/
http://mirrors.stuhome.net/centos/5.7/updates/x86_64/
http://centos.ustc.edu.cn/centos/5.7/updates/x86_64/
http://ftp.stu.edu.tw/Linux/CentOS/5.7/updates/x86_64/
http://mirror01.idc.hinet.net/CentOS/5.7/updates/x86_64/
http://ftp.tc.edu.tw/Linux/CentOS/5.7/updates/x86_64/
http://ftp.isu.edu.tw/pub/Linux/CentOS/5.7/updates/x86_64/
http://ftp.cs.pu.edu.tw/Linux/CentOS/5.7/updates/x86_64/
http://ftp.daum.net/centos/5.7/updates/x86_64/
http://mirror.khlug.org/centos/5.7/updates/x86_64/
http://data.nicehosting.co.kr/os/CentOS/5.7/updates/x86_64/
http://centos.tt.co.kr/5.7/updates/x86_64/
http://mirror.averse.net/centos/5.7/updates/x86_64/
ftp://ftp.oss.eznetsols.org/linux/centos/5.7/updates/x86_64/
http://mirror.nus.edu.sg/centos/5.7/updates/x86_64/
http://mirrors.sin1.sg.voxel.net/centos/5.7/updates/x86_64/
http://centos.vr-zone.com/5.7/updates/x86_64/
http://rsync.atworks.co.jp/centos/5.7/updates/x86_64/
http://ftp.nara.wide.ad.jp/pub/Linux/centos/5.7/updates/x86_64/

3./var/cache/yum/addons/mirrorlist.txt url:

http://mirror.centos.org/centos/5/addons/x86_64/

4./var/cache/yum/extras/mirrorlist.txt url:

http://centos.ustc.edu.cn/centos/5.7/extras/x86_64/
http://mirrors.stuhome.net/centos/5.7/extras/x86_64/
http://mirror.neu.edu.cn/centos/5.7/extras/x86_64/
http://mirrors.ta139.com/centos/5.7/extras/x86_64/
http://ftp.cs.pu.edu.tw/Linux/CentOS/5.7/extras/x86_64/
http://ftp.stu.edu.tw/Linux/CentOS/5.7/extras/x86_64/
http://ftp.tc.edu.tw/Linux/CentOS/5.7/extras/x86_64/
http://ftp.isu.edu.tw/pub/Linux/CentOS/5.7/extras/x86_64/
http://mirror01.idc.hinet.net/CentOS/5.7/extras/x86_64/
http://data.nicehosting.co.kr/os/CentOS/5.7/extras/x86_64/
http://mirror.khlug.org/centos/5.7/extras/x86_64/
http://ftp.daum.net/centos/5.7/extras/x86_64/
http://centos.tt.co.kr/5.7/extras/x86_64/
http://centos.vr-zone.com/5.7/extras/x86_64/
http://mirror.averse.net/centos/5.7/extras/x86_64/
http://mirrors.sin1.sg.voxel.net/centos/5.7/extras/x86_64/
ftp://ftp.oss.eznetsols.org/linux/centos/5.7/extras/x86_64/
http://mirror.nus.edu.sg/centos/5.7/extras/x86_64/
http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/5.7/extras/x86_64/
http://ftp.jaist.ac.jp/pub/Linux/CentOS/5.7/extras/x86_64/

 

参考资料:https://www.douban.com/note/199760527/

你可能感兴趣的:(linux环境搭建,linux指令,运维)