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。

相关推荐
CoovallyAIHub42 分钟前
15K Star中文首发!$5部署一个会自我进化的私人Agent——NousResearch开源Hermes Agent
git·架构·github
无限进步_2 小时前
【C++】巧用静态变量与构造函数:一种非常规的求和实现
开发语言·c++·git·算法·leetcode·github·visual studio
降临-max2 小时前
Git 协同开发与冲突解决
笔记·git
高志小鹏鹏3 小时前
告别“修复 bug”:让别人一眼看懂你的 Commit
git·github·代码规范
Rabbit_QL7 小时前
【Git基础】03——Git 撤销与回退:改错了怎么办
大数据·git·elasticsearch
无限进步_7 小时前
【C++&string】寻找字符串中第一个唯一字符:两种经典解法详解
开发语言·c++·git·算法·github·哈希算法·visual studio
木下~learning8 小时前
零基础Git入门:Linux+Gitee实战指南
linux·git·gitee·github·虚拟机·版本控制·ubunt
zh_xuan8 小时前
修改远程仓库名以及和本地工程同步
git
读书札记20229 小时前
Git 配置用户名和邮箱 解决 fatal: unable to auto-detect email address 问题
git
程序员 沐阳9 小时前
Git 二分法精准定位 Bug:从原理到实战,让调试效率起飞
git·elasticsearch·bug