CentOS 镜像仓库地址变更:Error: Failed to download metadata for repo appstream : Cannot prepare internal mirrorlist: No URLs in mirrorlist

470人浏览 / 0人评论

参考

https://blog.csdn.net/weixin_43252521/article/details/124409151

命令

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 makecache

yum update -y
yum -y install vim

全部评论