MySql教程

CentOS8使用putty安装MySQL时搜不到(无法下载)元数据,报Errors during downloading metadata for repository ‘epel‘:

本文主要是介绍CentOS8使用putty安装MySQL时搜不到(无法下载)元数据,报Errors during downloading metadata for repository ‘epel‘:,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

CentOS8使用putty安装MySQL时搜不到(无法下载)元数据,

报Errors during downloading metadata for repository 'epel': - Status code: 404 for http://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86_64/repodata/repomd.xml等错误,具体如下:

 

 

  

 

这可能是配置yum源的问题,需要切换源

 

 

 

正确解决流程可以参考下面链接博主的步骤:

【完美解决】【Centos8】Linux 为 repo ‘AppStream‘ 下载元数据失败、Could not resolve host: mirrors.cloud.aliyuncs.com_AspirinZjh的博客-CSDN博客

 在这里对其执行过程简单介绍:


运行以下命令备份之前的repo文件。
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo

 

 

 

运行以下命令下载最新的repo文件
wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo

 

 

 

运行以下命令替换repo文件中的链接,就是这一步出错了,官方提供的命令:

1、sed -i 's/mirrors.cloud.aliyuncs.com/url_tmp/g'  /etc/yum.repos.d/Centos-vault-8.5.2111.repo &&  sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/url_tmp/mirrors.aliyun.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo

2、sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/epel-archive-8.repo

 

http://mirrors.cloud.aliyuncs.com需要替换为http://mirrors.aliyun.com,但是官方提供的命令没替换完,如果有执行官方提供的命令还是不行的话执行下面的命令:

sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g'  /etc/yum.repos.d/Centos-vault-8.5.2111.repo 
sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g'  /etc/yum.repos.d/epel-archive-8.repo

 

 

运行以下命令重新创建缓存
yum clean all && yum makecache

 

 

 

执行成果,yum install也可以正常使用了

 转自:https://blog.csdn.net/qq_51515673/article/details/124273515
这篇关于CentOS8使用putty安装MySQL时搜不到(无法下载)元数据,报Errors during downloading metadata for repository ‘epel‘:的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!