YumRepo Error: All mirror URLs are not using ftp, http[错误:Cannot find a valid baseurl for repo: base

linux使用yum报错信息

已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Loading mirror speeds from cached hostfile
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/x86_64/6/base/mirrorlist.txt
错误:Cannot find a valid baseurl for repo: base
YumRepo Error: All mirror URLs are not using ftp, http[错误:Cannot find a valid baseurl for repo: base_第1张图片

 

 

查找到自己linux系统版本号,可以看到版本为6.10

head -n 1 /etc/issue

 

根据报错信息在/var/cache/yum/x86_64/6/base/路劲下找到mirrorlist.txt,没有则通过touch mirrorlist.txt创建

然后vi mirrorlist.txt   ,在敲击键盘I键进入输入模式,输入以下

http://mirror.neu.edu.cn/centos/6.10/updates/x86_64/
http://mirrors.ta139.com/centos/6.10/updates/x86_64/
http://mirrors.stuhome.net/centos/6.10/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/

此时需要对上信息部分修改,因为每个系统所需镜像不同,主要由于版本区别

如下修改为自己的系统版本,即开修改为本文头位置查找到的版本号,我这里是5.7改为我的6.10,一定要修改所有再保存(敲击Esc再输入:wq回撤)退出
 

YumRepo Error: All mirror URLs are not using ftp, http[错误:Cannot find a valid baseurl for repo: base_第2张图片

 

同理,根据报错信息找到自己修改位置,问题主要出现在以下信息所示

Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
 

以下为修改参考,复制后按照本文所说步骤修改后查验效果

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/
 

 

如果对你有帮助请点赞,如有疑问请留言,喜欢作者请关注

 

你可能感兴趣的:(linux,linux,运维,yum)