由于centos8 2022年停止服务,阿里云centos8 yum报错,yum 安装 mysql 报错,解决办法:

全屏阅读
  • 基本信息
  • 作者:
  • 作者已发布:924篇文章
  • 发布时间:2022年03月16日 0:31:40
  • 所属分类:Linux
  • 阅读次数:941次阅读
  • 标签:

阿里云 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml

阿里云 'everything': Cannot download repomd.xml: Cannot download repodata/repomd.xml

阿里云yum安装软件报错

故障原因:由于cenos8停服,后继版本为8-steam.

查看阿里云上的https://mirrors.aliyun.com/centos/8  发现文件已经不完整,我直接把8更换为了8-stream 

删除或移走/etc/yum.repos.d内的CentOS-AppStream.repo,CentOS-epel.repo

编辑/etc/yum.repos.d/CentOS-Base.repo 替换为以下内容,

# 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.
#
#
  
[base]
name=CentOS-8-stream - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
  
#additional packages that may be useful
[extras]
name=CentOS-8-stream - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
  
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-8-stream - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
  
[PowerTools]
name=CentOS-8-stream - PowerTools - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
 
[AppStream]
name=CentOS-8-stream - AppStream - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

然后执行

yum clean all

yum makecache

会发现问题已经解决,centos8  替换成centos8-steam后,对系统的影响还不知道,暂时问题解决,可以顺利yum安装mysql等软件

顶一下
(1)
100%
订阅 回复
踩一下
(0)
0%
» 郑重声明:本文由mpxq168发布,所有内容仅代表个人观点。版权归恒富网mpxq168共有,欢迎转载, 但未经作者同意必须保留此段声明,并给出文章连接,否则保留追究法律责任的权利! 如果本文侵犯了您的权益,请留言。

目前有 0 条留言 其中:访客:0 条, 博主:0 条

给我留言

您必须 [ 登录 ] 才能发表留言!