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


阿里云 '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 

这个是阿里云官方解决办法:https://help.aliyun.com/document_detail/405635.html

 

下面是我以前的处理方法:

删除或移走/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等软件

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM