This system is not registered with an entitlement server. You can use subscription-manager to regist

针对这个问题解决方法是:替换yum源

1.检查并删除原有的yum源

检查原有yum源
rpm -qa | grep yum
删除原有yum源 

rpm -qa|grep yum|xargs rpm -e --nodeps

2.下载安装CentOS的yum相关软件包 

下载新的yum源

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm 
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm 
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm

 

命令一次性安装三个包

rpm -ivh yum-* 

检查yum是否安装成功:

rpm -qa |grep yum

 

3.配置repo文件

将之前的备份并新建一个yum.repos.d,然后下载新的
cd /etc
mv yum.repos.d yum.repos.d.backup
mkdir yum.repos.d
cd yum.repos.d
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

通过vim打开并编辑repo

vim CentOS7-Base-163.repo

按 shift+:

输入 %s/$releasever/7/g

保存退出

4.清除缓存,重新加载缓存

yum clean all  ##清理缓存
yum makecache  ##重新生成缓存

执行 yum repolist all 查看是否安装成功:

 

安装 compose试一下

yum -y install epel-release

This system is not registered with an entitlement server. You can use subscription-manager to regist_第1张图片

你可能感兴趣的:(docker,yum)