yum安装报错“Error: xz compression not available”


在测试服务器进行docker学习,有些centos7软件安装上和自己的服务器不兼容所以导致yun下载软件时报错:Error: xz compression not available


对于报错解决办法:

  1. rm -fr /var/cache/yum/x86_64/6/epel/

  2. rm -rf /etc/yum.repos.d/epel*


重新安装epel源和base源

wget -O/etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-7.repo
yum repolist