[CentOS 8] Failed to download metadata for repo ‘AppStream’

1,783次阅读
没有评论

[CentOS 8] Failed to download metadata for repo 'AppStream'

CentOS 8 操作系统版本结束了生命周期(EOL),Linux 社区已不再维护该操作系统版本。建议您切换到其他源。如果您的业务过渡期仍需要使用 CentOS 8 系统中的一些安装包,请根据下文切换 CentOS 8 的源。
2021 年 12 月 31 日 CentOS 8 EOL。按照社区规则,CentOS 8 的源地址 http://mirror.centos.org/centos/8/ 内容已移除,目前第三方的镜像站中均已移除 CentOS 8 的源。如果您选择了下载或安装默认配置的 CentOS 8 的镜像,将会得到 404 报错。

详情

Cen­tOS 未来将会从 Red Hat En­ter­prise Linux (RHEL) 复刻版本的 Cen­tOS Linux 转向 Cen­tOS Stream。对于当前处于生命周期中的 Cen­tOS 版本和后续的影响如下:

  • 1、Cen­tOS Linux 7 作为 RHEL 7 的复刻版本,将会延续当前的支持计划,于 2020 年第四季度停止更新,并于 2024 年 6 月 30 日停止维护 (EOL,End Of Life);
  • 2、Cen­tOS Linux 8 作为 RHEL 8 的复刻版本,生命周期会缩短,将在 2021 年 12 月 31 日停止维护 (EOL),截止目前未看到该日期有延期的可能。
  • 3、不会再提供 Cen­tOS Linux 9 及后续版本,将会提供 Cen­tOS Stream 版本。

您可以通过下文的操作步骤,在 CentOS 8 操作系统将源配置按照网络环境不同进行切换。

[CentOS 8] Failed to download metadata for repo 'AppStream'

[root@server ~]# yum update
CentOS-8 - AppStream 0.0 B/s | 0 B 00:10
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

第一步: 进入 /etc/yum.repos.d/ 目录.

cd /etc/yum.repos.d/

第二步: 运行以下命令

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

第三步: 现在运行 yum 更新

yum update -y

正文完
 0
VPSWe
版权声明:本站原创文章,由 VPSWe 2022-02-24发表,共计996字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码