问题
[root@ecs]# yum install -y mysql57-community-release-el7-10.noarch.rpm
Extra Packages for Enterprise Linux 8 - x86_64 171 B/s | 196 B 00:01
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 (IP: 38.145.60.23)
Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
解决
这个是源的问题,需要更新yum的源
- 重命名原来的源
# 重命名原来的源
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
- 下载新的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
- 替换源地址
# 替换源地址
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 即可
[root@ecs]# yum install -y mysql57-community-release-el7-10.noarch.rpm
此针对ecs弹性云服务器处理方案