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。

相关推荐
刘马想放假44 分钟前
Git 从入门到进阶:一篇吃透版本管理的实战指南
git·gitlab
开发者联盟league2 小时前
git commit报错No .pre-commit-config.yaml file was found
git
猫老板的豆7 小时前
git实战
git
风曦Kisaki8 小时前
# Linux实战笔记-HIS项目实战Day01:版本控制与Git基础
linux·笔记·git
鲸~屿11 小时前
Git上传本地文件到GitHub教学指南
git·github
减瓦1 天前
Windows 环境使用 Git Bash 最佳实践
windows·git
史呆芬1 天前
CodeX多仓库提交Skill搭建
git·后端·openai
城东1 天前
Git使用[原意要新建分支提交但是误提交到原来分支恢复办法]
git·原意要新建分支提交·但是误提交到原来分支
开发者联盟league1 天前
git 压缩本地最近多个commit
git