Errors during downloading metadata for repository 'AppStream'
错误产生
- 阿里云服务器
- linux版本centOS8.2
- 执行 yum install -y [软件名]
错误内容
bash
CentOS-8 - AppStream 22 kB/s | 2.3 kB 00:00
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错误解决方法
下载:Centos-vault-8.5.2111.repo
进入文件夹
bashcd /etc/yum.repos.d/ ls # CentOS-AppStream.repo CentOS-centosplus.repo CentOS-Debuginfo.repo CentOS-Extras.repo CentOS-Media.repo CentOS-Sources.repo # CentOS-Base.repo CentOS-CR.repo CentOS-epel.repo CentOS-fasttrack.repo CentOS-PowerTools.repo CentOS-Vault.repo删除所有后缀为
.repo的文件bashrm *.repo rm: remove regular file 'CentOS-AppStream.repo'? Y rm: remove regular file 'CentOS-Base.repo'? y rm: remove regular file 'CentOS-centosplus.repo'? Y rm: remove regular file 'CentOS-CR.repo'? Y rm: remove regular file 'CentOS-Debuginfo.repo'? Y rm: remove regular file 'CentOS-epel.repo'? Y rm: remove regular file 'CentOS-Extras.repo'? Y rm: remove regular file 'CentOS-fasttrack.repo'? Y rm: remove regular file 'CentOS-Media.repo'? Y rm: remove regular file 'CentOS-PowerTools.repo'? Y rm: remove regular file 'CentOS-Sources.repo'? Y rm: remove regular file 'CentOS-Vault.repo'? Y上传Centos-vault-8.5.2111.repo
执行
yum makecachebashCentOS-8.5.2111 - Base - mirrors.aliyun.com 854 kB/s | 4.6 MB 00:05 CentOS-8.5.2111 - Extras - mirrors.aliyun.com 65 kB/s | 10 kB 00:00 CentOS-8.5.2111 - AppStream - mirrors.aliyun.com 573 kB/s | 8.4 MB 00:15 Metadata cache created.