已解决Errors during downloading metadata for repository ‘appstream‘: - Status code: 404 for
Posted 来老铁干了这碗代码
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了已解决Errors during downloading metadata for repository ‘appstream‘: - Status code: 404 for相关的知识,希望对你有一定的参考价值。
1. 报错
Errors during downloading metadata for repository ‘appstream’:
- Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148)
Error: Failed to download metadata for repo ‘appstream’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
2. 背景
阿里云CentOS 8系统,使用yum
指令安装mysql失败,弹出上述报错。
3. 我出现问题的原因
阿里云更新了下载数据源的地址, 因此我们在本地更换一下就好了。
4. 解决方案
4.1 替换 CentOS-Base.repo 数据源
cd /etc/yum.repos.d
mv CentOS-Linux-BaseOS.repo CentOS-Linux-BaseOS.repo.backup #备份,防止出问题。
wget -O CentOS-LinuxBaseOS.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo #拉取新文件
4.2 进入CentOS-Linux-AppStream.repo,修改数据源地址
vim指令,修改文件
vim /etc/yum.repos.d/CentOS-Linux-AppStream.repo
替换 baseurl
# baseurl=http://mirrors.cloud.aliyuncs.com/$contentdir/$releasever/AppStream/$basearch/os/
baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
4.3 重新创建元数据
yum makecache
创建成功的提示:
[root@iZbp1560750pcozwmd20reZ yum.repos.d]# yum makecache
Repository extras is listed more than once in the configuration
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Linux-epel.repo; 配置:ID 为 “failovermethod” 的 OptionBinding 不存在
CentOS-8.5.2111 - Base - mirrors.aliyun.com 63 kB/s | 3.9 kB 00:00
CentOS-8.5.2111 - Extras - mirrors.aliyun.com 27 kB/s | 1.5 kB 00:00
CentOS-8.5.2111 - AppStream - mirrors.aliyun.co 83 kB/s | 4.3 kB 00:00
CentOS Linux 8 - AppStream 31 MB/s | 8.4 MB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 42 MB/s | 11 MB 00:00
元数据缓存已建立。
以上是关于已解决Errors during downloading metadata for repository ‘appstream‘: - Status code: 404 for的主要内容,如果未能解决你的问题,请参考以下文章
已解决Errors during downloading metadata for repository ‘appstream‘: - Status code: 404 for
解决方法centos8 Errors during downloading metadata for repository ‘rabbitmq-erlang‘
解决方法centos8 Errors during downloading metadata for repository ‘rabbitmq-erlang‘
linuxcentos8报错:Errors during downloading metadata for repository ‘base‘
centos8报错:Errors during downloading metadata for repository ‘base‘