莫张周刘王 发表于 2024-8-31 21:32:39

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

错误信息如下:
https://i-blog.csdnimg.cn/direct/9d00940dcc6e450ca3df5fe48abac2fc.png
解决方案:
1、查抄机器是否链接外网
ping www.baidu.com  2、查看防火墙状态,并临时关闭防火墙。
systemctl status firewalld systemctl stop firewalld  https://i-blog.csdnimg.cn/direct/7a918fbe08b5405c8cfb6ac1c9942376.png
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
https://i-blog.csdnimg.cn/direct/22efd98f50b749cfa0a143c4e20f1636.png 6、清理老版本yum源,并更新新的yum源
yum clean all yum makecache  
https://i-blog.csdnimg.cn/direct/48790c82d4d24287aef8a6868525c6e6.png 
至此-以上完成yum源转换,并解决了yum无法利用。
 https://i-blog.csdnimg.cn/direct/b466d54e425e404a83e4276967b42e33.png

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: yum update 更新报错,在利用yum时failed