centos8.0执行yum指令出现Error:Failed to synchronize cache for repo ‘AppStream‘解决办法
解决方法:修改/etc/yum.repos.d下的
“CentOS-AppStream.repo”
“CentOS-Base.repo”
“CentOS-Extras.repo”
“CentOS-PowerTools.repo”
# CentOS-AppStream.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. # # [AppStream] name=CentOS-$releasever - AppStream baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
# 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. # # [BaseOS] name=CentOS-$releasever - Base baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
# CentOS-Extras.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. # # #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
# CentOS-PowerTools.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. # # [PowerTools] name=CentOS-$releasever - PowerTools baseurl=https://mirrors.aliyun.com/centos/8-stream/PowerTools/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
这时候你在使用yum命令就发现正常了
附录:原地址
CentOS-Base.repo
baseurl=http://mirrors.cloud.aliyuncs.com/$contentdir/$releasever/BaseOS/$basearch/os/
AppStream
http://mirrors.cloud.aliyuncs.com/$contentdir/$releasever/AppStream/$basearch/os/
extras
http://mirrors.cloud.aliyuncs.com/$contentdir/$releasever/PowerTools/$basearch/os/
PowerTools
http://mirrors.cloud.aliyuncs.com/$contentdir/$releasever/PowerTools/$basearch/o/z
————————————————
版权声明:本文为CSDN博主「liutianxiazhendehao」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/liutianxiazhendehao/article/details/124446182
发表评论