码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2015-03-02 18:30:56      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:

有台机器使用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我还不清楚,懂了之后补上。

 

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

标签:

原文地址:http://www.cnblogs.com/solohac/p/4308997.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!