YumRepo Error: All mirror URLs are not using ftp, http[s] or file

有台机器使用Yum的时候,报错如下:

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

 

猜测:

1.DNS问题

2. $releasever 取不到

 

1.改了DNS后测试,仍然有问题

2.查看/etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

由于yum读取mirrorlist的时候,$releasever取不到,导致url访问失败。

那么解决方法也简单,要么把$releasever弄好,

要么直接修改CentOS-Base.repo文件,替换$releasever为6。(因为我的是centos6)。

 

怎么修复$releasever我还不清楚,懂了之后补上。

 

posted on 2015-03-02 16:02  solohac  阅读(6345)  评论(0编辑  收藏  举报

导航