CentOS8 yum install失败
时间:03-29
作者:
在CentOS8上面用yum安装git的时候遇到如下问题:
[vagrant@192.168.38.4] ~ >> sudo yum install git
CentOS Linux 8 - AppStream 71 B/s | 38 B
[vagrant@192.168.38.4] ~ >> sudo yum install git
CentOS Linux 8 - AppStream 71 B/s | 38 B
在CentOS8上面用yum安装git的时候遇到如下问题:
[vagrant@192.168.38.4] ~ >> sudo yum install git
CentOS Linux 8 - AppStream 71 B/s | 38 B 00:00
Error: 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 -y
sudo dnf swap centos-{linux,stream}-repos -y
sudo dnf distro-sync -y
[vagrant@192.168.38.4] ~ >> sudo yum install git
CentOS Linux 8 - AppStream 71 B/s | 38 B 00:00
Error: 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 -y
sudo dnf swap centos-{linux,stream}-repos -y
sudo dnf distro-sync -y