Errors during downloading metadata for repository ‘appstream’:

CentOS Linux 8 – AppStream 6.4 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

Linux 版本:阿里云 Centos 8.4

阿里云服务器 Centos8+ 使用 yum 命令时报错 404

  • 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
  1. 进入 yum 源目录

cd /etc/yum.repos.d/

  1. 替换新的地址

for i in `ls`;do sed -i ‘s/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g’ $i;done
for i in `ls`;do sed -i ‘s/$releasever/$releasever-stream/g’ $i;done

  1. 添加缓存

yum clean all
yum makecache

————————————————
版权声明:本文为CSDN博主「皇御雷霆」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/fan63182830/article/details/122808633