Errors during downloading metadata for repository 'AppStream'

Errors during downloading metadata for repository ‘AppStream’

错误产生

  1. 阿里云服务器
  2. linux版本centOS8.2
  3. 执行 yum install -y [软件名]

错误内容

1
2
3
4
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

错误解决方法

  1. 进入阿里云开源镜像站-repo

  2. 下载:Centos-vault-8.5.2111.repo

  3. 进入文件夹

    1
    2
    3
    4
    5
    cd /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
  4. 删除所有后缀为.repo的文件

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    rm *.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
  5. 上传Centos-vault-8.5.2111.repo

  6. 执行yum makecache

    1
    2
    3
    4
    CentOS-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.

原文https://blog.csdn.net/u010349629/article/details/123283436


Errors during downloading metadata for repository 'AppStream'
https://crudclass.github.io/2022/05/31/linux/error/error1/
作者
Zero
发布于
星期二, 五月 31日 2022, 10:20 上午
许可协议