CentOS8无法安装、无法update问题解决:Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:…

CentOS8无法安装、无法update问题解决:Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:...

大家都知道Centos8于2021年年底停止了服务,大家再在使用yum源安装时候,出现下面错误“错误:Failed to download metadata for repo ‘AppStream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist”

1、进入yum的repos目录

cd /etc/yum.repos.d/

2、修改所有的CentOS文件内容

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-*

3、更新yum源为阿里镜像

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

yum clean all

yum makecache

4、yum安装测试是否可以yum安装

yum install wget –y

这个问题解决花了半个小时,越来越讨厌那些哔哔半天讲不到点上的了。教程能用就能用,不能用就是过期了,一些 debug 的文章非要绕来绕去绕来绕去。

本文原作者:看,未来

原创文章,作者:admin,如若转载,请注明出处:https://www.ipv6s.com/news/202206122043.html

(0)
上一篇 2022年6月7日 上午5:19
下一篇 2022年6月29日 下午10:34

相关推荐

  • 5G时代下,你看见这些机遇了吗?

    金秋九月,一年一度的信息通信业盛会―2021年中国国际信息通信展览会已在北京召开,华为以“融合聚变,点亮未来”为主题全方位参与本次盛会,展示并传递华为在5G、千兆光网、智能云网、云…

    2021年9月28日
    99000
  • 李星:中国参与IETF的实践

    在11月初的“互联网创新与发展论坛”上,清华大学李星教授回顾了中国互联网从创始之初以来的发展,他指出,当前,中国的发展已经离不开互联网,它在整个中国社会包括经济、文化、政治等方面的…

    新闻动态 2010年12月10日
    1.4K00

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注