当前位置:   article > 正文

docker在线安装错误提示:Could not resolve host....._could not resolve host: docker.xiaoya.pro

could not resolve host: docker.xiaoya.pro

1.问题描述

参考docker官方安装手册安装时,执行此yum安装工具命令在这里插入图片描述
出现以下报错:

Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
device-mapper-1.02.158-2.el7_7 FAILED                                          
http://mirrors.aliyun.com/centos/7/updates/x86_64/Packages/device-mapper-1.02.158-2.el7_7.2.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
正在尝试其它镜像。
device-mapper-event-1.02.158-2 FAILED                                          
http://mirrors.aliyun.com/centos/7/updates/x86_64/Packages/device-mapper-event-1.02.158-2.el7_7.2.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
正在尝试其它镜像。
device-mapper-event-libs-1.02. FAILED                                          
http://mirrors.aliyun.com/centos/7/updates/x86_64/Packages/device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
正在尝试其它镜像。
device-mapper-libs-1.02.158-2. FAILED                                          
http://mirrors.aliyun.com/centos/7/updates/x86_64/Packages/device-mapper-libs-1.02.158-2.el7_7.2.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
正在尝试其它镜像。
lvm2-2.02.185-2.el7_7.2.x86_64 FAILED                                          
http://mirrors.aliyun.com/centos/7/updates/x86_64/Packages/lvm2-2.02.185-2.el7_7.2.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
正在尝试其它镜像。
lvm2-libs-2.02.185-2.el7_7.2.x FAILED                                          
http://mirrors.aliyun.com/centos/7/updates/x86_64/Packages/lvm2-libs-2.02.185-2.el7_7.2.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
正在尝试其它镜像。

Error downloading packages:
  7:lvm2-libs-2.02.185-2.el7_7.2.x86_64: [Errno 256] No more mirrors to try.
  7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64: [Errno 256] No more mirrors to try.
  7:device-mapper-event-1.02.158-2.el7_7.2.x86_64: [Errno 256] No more mirrors to try.
  7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64: [Errno 256] No more mirrors to try.
  7:device-mapper-1.02.158-2.el7_7.2.x86_64: [Errno 256] No more mirrors to try.
  7:lvm2-2.02.185-2.el7_7.2.x86_64: [Errno 256] No more mirrors to try.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27

2.解决办法

经过自己各种查找、尝试(离线安装法),此问题和虚拟机DNS设置有关:
(1)首先利用查看ip的方式查看当前应该修改哪个配置文件

如上,我用的是ens33(每台电脑都不大相同)
(2)接着找到如下命令对应位置(我这里是ens33),设置DNS1=8.8.8.8,最后重启网络service network restart 即可。

vim /etc/sysconfig/network-scripts/ifcfg-ens33
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/818982
推荐阅读
相关标签
  

闽ICP备14008679号