docker中报错Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirro
1、mac进入dockerdocker run -it centos:latest /bin/bash2、yum install vim后报错信息如下:CentOS Linux 8 - AppStream 41 B/s | 38 B 00:00Error: Failed to download metadata for repo 'appstream': Cannot prepare intern
·
1、mac进入docker
docker run -it centos:latest /bin/bash
2、yum install vim后报错信息如下:
CentOS Linux 8 - AppStream 41 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
3、解决
进入 cd /etc/yum.repos.d/:
-
CentOS-Linux-BaseOS.repo
-
CentOS-Linux-AppStream.repo
-
CentOS-Linux-Extras.repo
将上面的三个文件中的baseUrl中的mirror.centos.org 替换成 vault.centos.org
4、再yum install 就可以正常了
更多推荐
已为社区贡献1条内容
所有评论(0)