【Errors】Errors during downloading metadata for repository ‘AppStream‘:

故障现象

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

[root@localhost ~]# yum makecache
CentOS-8 - Base - mirrors.aliyun.com 76 B/s | 2.3 kB 00:30 [Errors during downloading metadata for repository 'base': ] --- - Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 119.96.71.242)
Curl error (28): Timeout was reached for http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml [Connection timed out after 30004 milliseconds]
Curl error (6): Couldn't resolve host name for http://mirrors.cloud.aliyuncs.com/centos/8/BaseOS/x86_64/os/re

提示无法找到文件

处理过程

//查看系统版本
[root@localhost ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.2 (Ootpa)

//查看路径 URL ,发现(centos 8 ~8.5 版本)的文件 已经迁移到 https://mirrors.aliyun.com/centos/8-stream/ 这个目录下

[root@localhost ~]# curl https://mirrors.aliyun.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml

在这里插入图片描述
在这里插入图片描述
把 CentOS-Base.repo 文件里的$releasever 替换为 8-stream

[root@localhost ~]# sed -i 's/$releasever/8-stream/' /etc/yum.repos.d/CentOS-Base.repo 

[root@localhost ~]# yum clean all
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
37 files removed

[root@localhost ~]# yum makecache 
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
CentOS-8.5.2111 - Base - mirrors.aliyun.com                                                      1.9 MB/s |  21 MB     00:10    
CentOS-8.5.2111 - Extras - mirrors.aliyun.com                                                    158 kB/s |  10 kB     00:00    
CentOS-8.5.2111 - AppStream - mirrors.aliyun.com                                                 1.3 MB/s |  21 MB     00:16    
Docker CE Stable - x86_64                                                                        5.3 kB/s |  23 kB     00:04    
Metadata cache created.

##完成

注:centos 8 ~ centos8.5 版本的文件已迁移到https://mirrors.aliyun.com/centos/8-stream/

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
当您在使用Git或者其他版本控制系统下载某个仓库(Repository)的元数据时遇到"Errors during downloading metadata for repository 'LocalCD'"这样的错误,通常意味着在尝试获取仓库基本信息(如文件结构、提交历史等)的过程中遇到了问题。这可能是由于网络连接不稳定、服务器暂时不可用、仓库路径错误,或者权限不足等原因导致的。 具体可能的原因包括: 1. **网络问题**:您的设备可能没有正确连接到互联网,或者访问速度太慢,导致下载延迟或失败。 2. **仓库地址错误**:检查仓库URL是否正确,大小写是否一致,是否需要认证。 3. **缓存问题**:清除本地的Git缓存或者尝试更新到最新版本的Git客户端,有时候旧的元数据可能会导致问题。 4. **权限限制**:如果你在公司网络或者有防火墙设置,可能需要特定的访问权限才能下载某些私有仓库。 5. **服务器维护或故障**:有时第三方托管平台可能会进行维护,导致部分服务不可用。 为了解决这个问题,您可以按照以下步骤操作: 1. 检查网络连接并确保畅通。 2. 清除本地`~/.git`目录下的`objects`和`refs`子目录,然后重新尝试`git clone`。 3. 尝试使用代理服务器,如果适用的话。 4. 检查仓库URL是否正确,并确保有必要的访问权限。 5. 如果是企业内部仓库,确认是否允许从外部访问,或者联系管理员。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值