问题描述解决方案 问题描述
在CentOS8上面用yum安装git的时候遇到如下问题:
[vagrant@192.168.38.4] ~ >> sudo yum install gitCentOS Linux 8 - AppStream 71 B/s | 38 B 00:00Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
尝试利用换镜像源的方案没有作用
linux 为 repo ‘AppStream’ 下载元数据失败
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
如果想要更新centos8:
sudo dnf install centos-release-stream -ysudo dnf swap centos-{linux,stream}-repos -ysudo dnf distro-sync -y
特此记录