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。

相关推荐
江木1231 小时前
Git常用命令(记录)
git
程序猿看视界4 小时前
Halo 开发者指南——项目运行、构建
git·docker·node.js·pnpm·idea·openjdk·halo
俊昭喜喜里5 小时前
Git学习笔记
笔记·git·学习
好想有猫猫6 小时前
【Git】常见命令(仅笔记)
linux·c++·笔记·git·elasticsearch
阿东日志11 小时前
实习期间git的分枝管理以及最常用的命令
git·面试·实习
冰淇淋烤布蕾15 小时前
git 你要如何打开这个文件
git·vscode·intellij-idea
qq_4269384815 小时前
git-fork操作指南
git·python
珊珊而川17 小时前
撤回仓库的提交
git
aabbccQBB19 小时前
前端开发macbook——NVM环境配置以及git配置流程
前端·git
神州永泰1 天前
Gitlab及Git使用说明
git·elasticsearch·gitlab