环境背景:epel源下载地址:

http://mirrors.aliyun.com/Centos内核内核版本[root@nfs01 ~]# uname -r2.6.32-642.el6.x86_64==集群架构批量执行

yum install ipvsadm -y

报错:

*epel: mirrors.aliyun.comError: xzcompressionnot available

[root@web01 tmp]# cat /server/scripts/plzs.shyum install -y ipvsadm[root@m01 ~]# ansible oldboy -m shell -a "/bin/sh/server/scripts/plzs.sh"172.16.1.31 | FAILED | rc=1 >>Loaded plugins: fastestmirror, securitySetting up Install ProcessLoading mirror speeds from cached hostfile * epel: mirrors.aliyun.comError:xz compression not available…………此处略=

追寻错误根源:

相同epel源下的其他机器执行

yum install ipvsadm -y正常

猜想:本机epel执行过的yummakecache导致epel源改变2、更新本机所有软件版本:

[root@nfs01 ~]# yum updateLoaded plugins: fastestmirror, securitySetting up Update ProcessLoading mirror speeds from cached hostfile * epel: mirrors.aliyun.comepel

| 4.3 kB    00:00    Error: xz compression not available

结论:同样的问题,并且下载其他软件同样报错

通过错误基本判断出错方向

*epel: mirrors.aliyun.comError: xz compression not available

(epel源不符,xz压缩不可用)

猜想结论

yum中“repomd.xml”作用,是提供了“更新.xml.gz”的下载信息和SHA校验值。若执行yum makecache将服务器上的软件包本地缓存,后将*.xml中的检验值更改,导致yum下载校验出错

验证结论:

方法:找出本地服务器中的所有repomd.xml尾的文件和正常环境中repomd.xml进行比对

[root@web01 ~]# find / -type f -name "*repomd.xml*"

/var/cache/yum/x86_64/6/epel/repomd.xml

/var/cache/yum/x86_64/6/base/repomd.xml

/var/cache/yum/x86_64/6/extras/repomd.xml

/var/cache/yum/x86_64/6/updates/repomd.xml

验证结果:多处存在改动

diff repomd.xml /var/cache/yum/x86_64/6/epel/repomd.xml

3c3<  <revision>1489581919</revision>--->  <revision>1489581221</revision>8,11c8,11<    <checksumtype="sha256">086a4493b8fff841a620dc106fbc01ee1cd706fdee44c20a61f96ed18f0b521d</checksum><    <locationhref="repodata/086a4493b8fff841a620dc106fbc01ee1cd706fdee44c20a61f96ed18f0b521d-comps-el6.xml"/><    <timestamp>1489582011</timestamp><    <size>1319051</size>---略=============================================================================

执行解决方法:

1) 备份后将比对出入文件进行删除

\rm/var/cache/yum/x86_64/6/{base,extras,updates,epel}/repomd.xml -f

2) yum clean all清理下yum缓存

3) 更新yum updateyum

updateLoaded plugins: fastestmirror, securitySetting up Update ProcessLoading mirror speeds from cached hostfile *base: mirrors.aliyun.com *epel: mirrors.aliyun.com *extras: mirrors.aliyun.com *updates: mirrors.aliyun.com···························略

4) 重新执行

yum install ipvsadm -y

Loaded plugins: fastestmirror, securitySetting up Install ProcessLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: mirrors.aliyun.com·······················略

Complete!原命令执行成功yum问题解决!

结论:

yum中“repomd.xml”作用,是提供了“更新.xml.gz”的下载信息和SHA校验值。若执行yum makecache将服务器上的软件包本地缓存,后将*.xml中的检验值更改,导致yum下载校验出错,用的时候慎重(yum makecache问题目前解释短浅,会继续跟踪,排错仅供临时解决问题)

yum 安装报错:*epel: mirrors.aliyun.comError: xzcompressionnot available的更多相关文章

  1. 【linux系列】yum安装报错 no mirrors to try

    执行以下命令去重新生成缓存 yum clean all yum makecache 更换源重新下载repo文件 重新生成缓存

  2. linux -小记(2)问题:yum 安装报错"Another app is currently holding the yum lock; waiting for it to exit... ...: yum Memory : 26 M RSS (868 MB VSZ) Started: Wed Oct 26 22:48:24 2016 - 0"

    yum 安装报错 "Another app is currently holding the yum lock; waiting for it to exit... The other ap ...

  3. yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between

    yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between attempted installs of php-pecl-f ...

  4. 使用yum安装报错:[Errno 256] No more mirrors to try

    背景:我使用yum方式安装软件时,比如zabbix这种软件,我们在安装时一般都是直接到zabbix官网,按照官方的步骤进行安装,但是有一个问题,官方的服务器不在国内,时常会在安装时导致超时报错.此时解 ...

  5. CentOS7.2 yum安装报错

    1.yum源repodata配置文件repomd.xml无法找到: Couldn't open file /mnt/cdrom/repodata/repomd.xml 先找到repomd.xml的路径 ...

  6. 故障小记录:yum 安装报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:

    发生原因: 由于yum是基于python的,之前安装我python3,当我修改了python命令的指向到python3之后就会发生这样的问题. 解决办法: 由于我当初想到可能以后还需要python2, ...

  7. yum安装报错:Failure when receiving data from the peer

    系统:Centos6.9 操作:yum install -y *.rpm 报错信息: Transaction Summary ===================================== ...

  8. CentOS release 6.5 yum安装报错

    单独安装如下任何一个包都会报依赖错误,需要一起安装才可以 rpm -ivh yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm yum-3.2.29-4 ...

  9. yum 安装报错 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:

    原因: 这是因为yum采用python作为命令解释器,这可以从/usr/bin/yum文件中第一行#!/usr/bin/python发现.而python版本之间兼容性不太好,使得2.X版本与3.0版本 ...

随机推荐

  1. 非计算机专业的伟伯是怎样拿到阿里Offer的。求职励志!!!

    写在前面: 2015 年 7 月初.參加阿里巴巴校招内推, 8 月 15 日拿到研发project师 JAVA 的 offer .我的专业并不是计算机,也没有在互联网公司实习过,仅仅有一些学习和面试心 ...

  2. InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts

    在一台server中以各数据库的备份文件为数据文件启动多个MySQL实例供SQL Review使用. 之前执行一直没有问题(最多的时候有23个MySQL实例同一时候执行).后来新配置了一台server ...

  3. linux系列之-—03 常见问题

    问题1 描述:Linux如何查看JDK的安装路径 问题2 描述:执行shell脚本时报错,错误信息为:bash: line 19: jar: command not found 原因:因为在系统环境变 ...

  4. Domino/Xpages Bootstrap 动态生成首页功能

    因为之前用户须要做个动态首页的功能,但一般用户又不熟HTML,所以最佳的方法能够使用拖动的方法来配置首页,一些主要的组件是已经帮用户的依据实际数据情况已经制作OK,用户仅仅须要简单配置就能够更改首页, ...

  5. 在调试C++程序是出现这个问题的解决方案illegal pure syntax, must be '= 0'

    笔者在调试c++的时候遇见了这个问题 E:\Data Struct\SqString\新建 文本文档.cpp(5) : error C2258: illegal pure syntax, must b ...

  6. Sql数据库查询语言

    1.概述 Sql是一种面向数据库的结构化查询语言.是符合美国国家标准化组织ANSI的一种计算机标准语言. Sql具对数据库的操作有:增删改查.创建数据库.创建表.创建存储过程.创建视图等 RDBMS关 ...

  7. zTree 基本用法

    [简介] zTree 是利用 JQuery 的核心代码,实现一套能完成大部分常用功能的 Tree 插件 兼容 IE.FireFox.Chrome 等浏览器 在一个页面内可同时生成多个 Tree 实例 ...

  8. java jdbc/ojdbc 链接oracle的三种方式

    方法一:使用service_name 连接oracle  jdbc:oracle:thin:@//:/<service_name> 例如: jdbc:oracle:thin:@//10.1 ...

  9. jquery中的工具函数 Utilities

    noConflict(deep) 释放$和Jquery的控制权 isFunction(obj) isArray(obj) isWindow(obj) isNumeric(obj) type(obj) ...

  10. vue 练习 bug

    在使用vue slot分发内容时,如果要绑定事件,不能绑定在slot元素上,同样的不能绑定在自定义元素的模板上,只能绑定在html 元素上,才会生效 demo <my-component v-o ...