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。

相关推荐
白开水不加冰1 小时前
git初始化及操作指南
git
PyAIGCMaster3 小时前
vscode git push 记录
ide·git·vscode
君鼎4 小时前
Git企业级——进阶
git
*neverGiveUp*6 小时前
本地分支git push 报错 fatal: The current branch XXXX has no upstream branch.
前端·git·gitea
℘团子এ17 小时前
git中,给分支添加备注
git
Ring__Rain17 小时前
git 暂存功能使用
git
神奇萝卜头1 天前
Git基础面试题
git
蜡笔小新..1 天前
Git命令汇总(自用,持续更新update 5/23)
git
Tipriest_1 天前
github cli主要用途,优势,和git的区别
git·github·gh·github cli
ImangoCloud1 天前
Git的windows开发与linux开发配置
linux·windows·git