centos6.5 环境下yum报错YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid re

在centos6.5的服务器上yum应用时报错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 Error: Cannot find a valid baseurl for repo: base…
可供参考解决方法:
直接将/etc/yum.repos.d/CentOS-Base.repo文件内容替换为以下内容
[base]
name=CentOS- r e l e a s e v e r e n a b l e d = 1 f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − v a u l t / c e n t o s / releasever enabled=1 failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-vault/centos/ releaseverenabled=1failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosvault/centos/releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6

[updates]
name=CentOS- r e l e a s e v e r e n a b l e d = 1 f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − v a u l t / c e n t o s / releasever enabled=1 failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-vault/centos/ releaseverenabled=1failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosvault/centos/releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6

[extras]
name=CentOS- r e l e a s e v e r e n a b l e d = 1 f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − v a u l t / c e n t o s / releasever enabled=1 failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-vault/centos/ releaseverenabled=1failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosvault/centos/releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6

[centosplus]
name=CentOS-6.10 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/centos/ r e l e a s e v e r / c e n t o s p l u s / releasever/centosplus/ releasever/centosplus/basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6

[contrib]
name=CentOS-6.10 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/centos/ r e l e a s e v e r / c o n t r i b / releasever/contrib/ releasever/contrib/basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值