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。

相关推荐
书琴9 小时前
关于git的stash参数
git
@大迁世界9 小时前
如何将一个 Git 项目关联到两个远程仓库(且不出错)
git
康不坦丁13 小时前
不再苦恼 git 命令打错单词啦-git 别名
git·后端
Mr.stupidCoder1 天前
Git将本地文件推送到GitHub仓库
git·elasticsearch·github
RocketJ1 天前
mac电脑.sh文件,用来清除git当前分支
git·elasticsearch·macos
热血的柯基破防了1 天前
Git命令与代码仓库管理
git·gitee
C++ 老炮儿的技术栈1 天前
visual studio 2022更改主题为深色
c语言·开发语言·c++·ide·windows·git·visual studio
南棱笑笑生1 天前
20250614在Ubuntu20.04.6下分步骤编译Rockchip的RK3576原厂SDK
java·开发语言·git
Jooolin1 天前
Git 与 GitHub 的最佳协作范式:从 Fork 到 Pull Request,打开开源贡献之门
git·github·ai编程
Jooolin1 天前
【编程史】Git是啥?它和GitHub关系是?
linux·git·github