CentOS6.5 遇到YumRepo Error: All mirror URLs are not using ftp, http[s] or file问题
1.修改yum配置文件
vi /etc/yum.repos.d/CentOS-Base.repo #打开yum配置文件
2.替换CentOS-Base.repo中内容
将下面的配置信息复制替换掉CentOS-Base.repo文件里的内容
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-6.5 - Base
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/os/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-6.5 - Updates
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[extras]
name=CentOS-6.5 - Extras
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/extras/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[centosplus]
name=CentOS-6.5 - Plus
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[contrib]
name=CentOS-6.5 - Contrib
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/contrib/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
注:里面的信息要根据自己的centos版本做相应的调整
6.5版本的就修改6.5,如果是6.6就修改为6.6
3.清理缓存
yum clean all #清除yum缓存
rm -rf /var/cache/yum/ #删除yum缓存文件
yum makecache #重新创建yum缓存,这里注意系统时间要与因特网一致
版权声明:
本文转载于MI_farmer的原创文章
原文链接:YumRepo Error: All mirror URLs are not using ftp, http[s] or file解决办法-CSDN博客