1

When I am trying to install docker, an issue happens when I type this command into the Linux shell:

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] curl#7 - "Failed to connect to 2600:9000:219a:f800:3:db06:4200:93a1: Network is unreachable"

But when i go browser with this url

https://download.docker.com/linux/centos/docker-ce.repo

I can download the file.

I followed this reference to install Docker:

https://computingforgeeks.com/installing-docker-ce-ubuntu-debian-fedora-arch-centos/

Would you please tell me the recommended way to install?

2
  • You system is resolving (and trying to use) IPv6. Probably your system only uses IPv4. To disable IPv6 on yum, add a line ip_resolv = 4on section "main" of /etc/yum.conf file.
    – JucaPirama
    Oct 29 '19 at 14:26
  • @JucaPirama typo: should be ip_resolve=4. That worked for me, so thanks. Feb 17 '20 at 22:31
0

You system is resolving (and trying to use) IPv6. Probably your system only uses IPv4. To disable IPv6 on yum, add a line ip_resolve = 4 on section "main" of /etc/yum.conf file

1
  • When added ip_resolve=4, i got this error message Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; Operation now in progress" Jul 15 at 7:00
0

Maybe your environment won't let ips in some range to be in and yum-config-manager not honors your proxy environment variable. So With the logic of trying all the ips in ipv4, it starts to use ipv6 and also failed.

One way to bypass this problem is to add the proxy setting in /etc/yum.conf like below and always to remember to take it away as it might have some side effect when your system has an inner repository.

[main]
proxy=http://yourproxyserver:yourproxyport

What's more, there is an issue for this https://github.com/rpm-software-management/yum-utils/issues/65, hope someone can solve it.

Thanks, in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.