centos 6 yum源不可用安装报YumRepo Error: All mirror URLs are not using ftp, http[s] or file
centos6 ping外网能通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
解决方案
为了解决这个问题,我们需要修改/etc/yum.repos.d/CentOS-Base.repo,然后替换掉所有镜像源。
1.进入到 /etc/yum.repos.d/目录
cd /etc/yum.repos.d/
2.备份原文件
cp CentOS-Base.repo CentOS-Base.repo.old
3.编辑新文件
vi CentOS-Base.repo
4.替换掉镜像源
# 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.
#
#
[os]
name=Qcloud centos os - $basearch
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/os/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-6
[updates]
name=Qcloud centos updates - $basearch
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/updates/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-6
[centosplus]
name=Qcloud centosplus - $basearch
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/centosplus/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-6
[contrib]
name=Qcloud centos contrib - $basearch
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/contrib/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-6
[cr]
name=Qcloud centos cr - $basearch
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/cr/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-6
[extras]
name=Qcloud centos extras - $basearch
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/extras/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-6
[fasttrack]
name=Qcloud centos fasttrack - $basearch
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/fasttrack/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-6
原因
CentOS 6 于2020年11月30日停止维护,而Yum想要连接旧版本的仓库。所以,我们需要更新陈旧版本的仓库然后指向vault。
linux能ping通外网火狐浏览器打不开网页,这个原因换一个HTTP看,估计是HTTPS原因。
正如错误提示,https连接的公钥私钥创建不成立,加密通道创建失败无法连接。你ping的时候能成功应该用的是http协议。
文章出处:centos 6 yum源不可用安装报错 centos6 外网能通yum无法用原因 _菜市场网络技术交流社区|游戏服务端|游戏源代码|手游服务端|游戏模拟器|永恒之塔私服 官方网址:http://bbs.aionchs.com/
-
飞飞服务端 flyff1.9
2024-04-25栏目: 亲自端游
-
为方便交流启动新论坛
2024-04-17栏目: 问题解答
-
永恒传奇2.5d
2024-04-10栏目: 亲自端游
-
剑侠龙雀手游
2024-04-10栏目: 亲自手游
-
石器时代80 WIN端一键 支持win7 10 11
2024-04-09栏目: 亲自端游
发表评论 已发布 0 条