kavin

centos 8报错Error: Failed to download metadata for repo centos8装宝塔报错

kavin 运维技术 2023-01-28 802浏览 0

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

centos 8报错Error: Failed to download metadata for repo centos8装宝塔报错

首先,进入到 yum 的 repos 目录

cd /etc/yum.repos.d/

其次,修改 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-*

然后,生成缓存更新(第一次更新,速度稍微有点慢,耐心等待两分钟左右)

yum makecache  就可以了

继续浏览有关 技术运维 的文章
发表评论