yum install git

问题:

bash 复制代码
[root@hcss-ecs-2a6a maven]# yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base                                                                                                                                                         | 3.6 kB  00:00:00     
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a03:2880:f117:83:face:b00c:0:25de: Network is unreachable"
Trying other mirror.
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a03:2880:f117:83:face:b00c:0:25de: Network is unreachable"
Trying other mirror.

更换镜像源

你可以尝试使用阿里云的 Docker 仓库镜像源。编辑 /etc/yum.repos.d/docker-ce.repo 文件,将内容替换为:

bash 复制代码
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg

然后运行以下命令更新仓库缓存并安装 Docker:

bash 复制代码
sudo yum makecache fast
sudo yum install docker-ce

通过这些步骤,你应该能够解决网络连接问题并成功安装 Docker。

相关推荐
麻辣璐璐7 小时前
【新手小白版】Gerrit使用教程
git·gerrit·新手
AlexMercer101213 小时前
Ubuntu从零开始配置Git
c++·git·ubuntu·gitee
胡西风_foxww1 天前
git 添加除了包含特定字符串的文件
git·字符串·文件·add·添加·特定·包含
parade岁月1 天前
Git 凭据管理器原理与多账号管理指南
git
zzzyulin1 天前
git note
git
六件套是我1 天前
【解答疑惑】git执行cherrypick后到另一个分支,然后再合并会出现问题吗?
git
sulikey2 天前
从零配置一个规范的 Python Git 仓库(适用于 Gitee / GitHub)
git·python·pycharm·gitee·github
学渣676562 天前
【面向小白】git rebase全面总结,什么时候用rebase
git
小龙报2 天前
《算法每日一题(1)--- 第31场蓝桥算法挑战赛》
c语言·开发语言·c++·git·算法·学习方法
222you2 天前
idea整合Git
git