当前位置:首页 » 《我的小黑屋》 » 正文

yum update 更新报错,在使用yum时failed

4 人参与  2024年09月26日 14:40  分类 : 《我的小黑屋》  评论

点击全文阅读


错误信息如下:

解决方案:

1、检查机器是否链接外网

ping www.baidu.com

 2、查看防火墙状态,并暂时关闭防火墙。

systemctl status firewalld
systemctl stop firewalld

 

3、备份当前yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

4、安装新的yum源(下载国内yum源配置文件到/etc/yum.repos.d/CentOS-Base.repo)

阿里云 CentOS 7 源(推荐):

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

网易163 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

搜狐 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS7-Base-sohu.repo

华为云 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.myhuaweicloud.com/repo/CentOS-7.repo

华东理工大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.ustc.edu.cn/centos/7/os/x86_64

清华大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/

北京理工大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.bfsu.edu.cn/centos/7/os/x86_64/

上海交通大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://ftp.sjtu.edu.cn/centos/7/os/x86_64/

中国科学技术大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.ustc.edu.cn/centos/7/os/x86_64/

兰州大学 CentOS 7 源:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirror.lzu.edu.cn/centos/7/os/x86_64/

5、以阿里云源为例:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

 6、清理老版本yum源,并更新新的yum源

yum clean all
yum makecache

 

 

至此-以上完成yum源转换,并解决了yum无法使用。

 


点击全文阅读


本文链接:http://m.zhangshiyu.com/post/164887.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最新文章

  • 妻子情夫要刷我的卡抢我儿子的交流会名额删减内容修复版本(许凌笙岑雪萧麒)全书免费_(许凌笙岑雪萧麒)妻子情夫要刷我的卡抢我儿子的交流会名额删减内容修复版本后续(许凌笙岑雪萧麒)
  • 想卷我财产?那你是碰到铁板了(舒楹谢执砚)_想卷我财产?那你是碰到铁板了舒楹谢执砚
  • 朝云绚丽一瞬番外+完结新上(谢青临宋初吟)全书免费_(谢青临宋初吟)朝云绚丽一瞬番外+完结新上后续(谢青临宋初吟)
  • 玄音消时,情缘烬夜玄澈完本_玄音消时,情缘烬(夜玄澈)
  • 迷失在岁月漫长全书+后续(林翊驰顾星晚)_迷失在岁月漫长全书+后续
  • 不惹往昔相思痛高分完本(时晏沈心瑶沈小晚林浩洋)_不惹往昔相思痛高分完本
  • 星光不渡忘川人赏析(霍言琛乔晚沈佳薇),星光不渡忘川人赏析
  • 完结文假情假意的爱免费+结局列表_完结文假情假意的爱免费+结局(裴钧晟崔艺眠)
  • 高分_顾清冉小说(末世降临:我携战剑组女子小队)(顾清冉)全本完整阅读
  • 上流社会准则小说(林岁欢俞景川)全文免费阅读大结局无删减_(林岁欢俞景川)上流社会准则小说结局+番外看点十足_笔趣阁
  • 时青潋施窈:完结+结局+番外(时青潋施窈施窈时青潋:完结+结局+番外)
  • 全文长恨长勿念免费(姜承年阮语槐)列表_全文长恨长勿念免费

    关于我们 | 我要投稿 | 免责申明

    Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1