从docker仓库安装最新的centos,无法安装git
解决方法如下:
进入目录
# 1.cd /etc/yum.repos.d/
修改文件内容
# 2.sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# 3.sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
生成缓存更新
# 4.yum makecache
运行 yum update 并重新安装
yum update -y
yum -y install git
标签:centos,46,repos,etc,sed,yum,解决,docker
From: https://www.cnblogs.com/socoo-/p/17002943.html