一,报错
[root@osc ~]# yum install -y python3-pip
Loaded plugins: fastestmirror, security
Setting up Install Process
Determining fastest mirrors
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
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
或: https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: [email protected]
二,解决:
1,查看CentOS-Base.repo中的配置[root@osc ~]# cd /etc/yum.repos.d/
[root@osc yum.repos.d]# cp CentOS-Base.repo CentOS-Base.repo.back
[root@osc yum.repos.d]# vi CentOS-Base.repo
原配置:
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
2,修改配置:
修改后:
说明:把所有的baseurl修改为vault
3,为什么这么改?
访问:
http://mirror.centos.org/centos/6/
如图:
可以看到,文字中说明了archived content已切换到了 Vault mirror
所以我们需要切换链接
4,修改完成后,做makecache (更新yum的缓存)
[root@osc yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, security
Determining fastest mirrors
epel/metalink
...
三,查看linux的版本:
[root@osc ~]# cat /etc/redhat-release
CentOS release 6.10 (Final)
标签:CentOS,centos,6.10,repo,yum,报错,osc,root From: https://www.cnblogs.com/architectforest/p/17384592.html