Advertisement

centos7安装docker遇到的问题

阅读量:

**

(centos7安装docker遇到的问题)

**

报错:插件fastestmirror已成功安装, langpacks##
从缓存的主机文件中获取镜像速度。

https://wiki.centos.org/yum-errors

Please ensure that the above article does not assist in resolving this issue. For further assistance, please refer to https://bugs.centos.org.

One of the configured repositories has failed (added via https://download.docker.com/linux/c),
Yum cannot proceed due to insufficient cached data. In this situation, Yum's safest option is to fail.
The following methods can be employed as workarounds:

复制代码
 Contact the upstream for the repository and get them to fix the problem.
    
     2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).
    
     3. Run the command with the repository temporarily disabled
        yum --disablerepo=download.docker.com_linux_c ...
    
     4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:
    
        yum-config-manager --disable download.docker.com_linux_c
    or
        subscription-manager repos --disable=download.docker.com_linux_c
    
     5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:
    
        yum-config-manager --save --setopt=download.docker.com_linux_c.skip_if_unavailable=true

出现错误:repodata/repomd.xml从download.docker.com_linux_c获取时失败。由于HTTPS连接失败(错误码14),无法从https://download.docker.com/linux/c/repodata/repomd.xml获取资源。可供采取的应对措施有两种:针对第一条问题(阿里提供的镜像配置仍指向docker官方服务器),请按照以下步骤进行处理:

sudo vim /etc/yum.repos.d/docker-ce.repo

通过命令把https://download-stage.docker.com

替换为http://mirrors.aliyun.com/docker-ce

此命令为:
:%s#https://download-stage.docker.com#http://mirrors.aliyun.com/docker-ce#g
此操作将移除所有与Docker相关的仓库配置,并经过处理后仅剩下一些配置项。

在这里插入图片描述

删除之后在安装应该就没有问题了。

全部评论 (0)

还没有任何评论哟~