Centos7系统安装yum遇到的问题failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try. http:

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try. 异常 yum makecache failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try. http://mirrors.aliyun.com/centos/$releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - N... 阅读详情
AI摘要

本文针对Linux系统中yum makecache出现的问题,指出主要在于yum源问题,并给出了简单有效的解决方法。包括查看并卸载yum依赖包,进入镜像网站找到对应系统的yum包进行下载安装,更新repo文件,最后重新运用yum安装软件。

当遇到这个问题的时候,发现网上也有很人也在问同样的问题。但是发现大家大都问,很少有人能说的很清楚,而且很多人的解决方法复杂且不能解决问题。我查了近二十篇文章,对照做了,但是基本解决不了问题。

下面由我给出一种最简单最有效的方法。耐心看下去哦!

问题所在:[root@cit-server6-s1-372 yum.repos.d]# yum makecache

Loaded plugins: fastestmirror
base                                                                     | 5.6 kB  00:00:00     
http://mirrors.163.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Trying other mirror.


 One of the configured repositories failed (CentOS-7 - Base - 163.com),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Disable the repository, so yum won't use it by default. Yum will then
        just ignore the repository until you permanently enable it again or use
        --enablerepo for temporary usage:

            yum-config-manager --disable base

     4. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.163.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
[root@cit-server6-s1-372 yum.repos.d]# 


错误所在的问题:

主要问题在于yum源问题。

下面开始解决问题:

下面这一段参考博客:https://blog.youkuaiyun.com/shaoqiufeng/article/details/78785806

1. 查看centos7.2系统本身所安装的yum依赖包

[root@zf-test-web01-4 ~]# rpm -qa|grep yum

yum-plugin-fastestmirror-1.1.31-34.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-3.4.3-132.el7.centos.0.1.noarch

2. 卸载这些软件包

[root@zf-test-web01-4 ~]# rpm -e yum-plugin-fastestmirror-1.1.31-34.el7.noarch --nodeps
warning: /etc/yum/pluginconf.d/fastestmirror.conf saved as /etc/yum/pluginconf.d/fastestmirror.conf.rpmsave
[root@zf-test-web01-4 ~]# rpm -e yum-metadata-parser-1.1.4-10.el7.x86_64 --nodeps
[root@zf-test-web01-4 ~]# rpm -e yum-3.4.3-132.el7.centos.0.1.noarch --nodeps
[root@zf-test-web01-4 ~]# 

3. 进入centos镜像网站找到自己对应系统需要的yum包

    查看系统的命令:

[root@zf-test-web01-4 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core) 

   查看系统的位数:

[root@zf-test-web01-4 ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=aa7ff68f13de25936a098016243ce57c3c982e06, stripped

4.下载并安装yum依赖包

wget http://vault.centos.org/7.2.1511/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm
wget http://vault.centos.org/7.2.1511/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://vault.centos.org/7.2.1511/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm

5. 安装下载的这些yum包
[root@zf-test-web01-4 ~]# rpm -ivh yum-*
Preparing...                          ################################# [100%]
Updating / installing...
   1:yum-metadata-parser-1.1.4-10.el7 ################################# [ 33%]
   2:yum-plugin-fastestmirror-1.1.31-3################################# [ 67%]
   3:yum-3.4.3-132.el7.centos.0.1     ################################# [100%]

[root@zf-test-web01-4 ~]
6. 更新centos系统的repo文件
http://mirrors.163.com/.help/centos.html
1)首先备份/etc/yum.repos.d/CentOS-Base.repo
[root@zf-test-web01-4 yum.repos.d]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2)下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)
3)运行以下命令生成缓存
[root@zf-test-web01-4 yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Cleaning repos: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
[root@zf-test-web01-4 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
base                                                             | 3.6 kB  00:00:00     
extras                                                           | 3.4 kB  00:00:00     
updates                                                          | 3.4 kB  00:00:00     
(1/12): base/7/x86_64/group_gz                                   | 156 kB  00:00:00     
(2/12): base/7/x86_64/filelists_db                               | 6.7 MB  00:00:01     
(3/12): extras/7/x86_64/prestodelta                              |  71 kB  00:00:00     
(4/12): extras/7/x86_64/primary_db                               | 145 kB  00:00:00     
(5/12): extras/7/x86_64/filelists_db                             | 528 kB  00:00:00     
(6/12): extras/7/x86_64/other_db                                 |  97 kB  00:00:00     
(7/12): updates/7/x86_64/prestodelta                             | 589 kB  00:00:00     
(8/12): base/7/x86_64/primary_db                                 | 5.7 MB  00:00:01     
(9/12): base/7/x86_64/other_db                                   | 2.5 MB  00:00:00     
(10/12): updates/7/x86_64/primary_db                             | 4.5 MB  00:00:00     
(11/12): updates/7/x86_64/other_db                               | 490 kB  00:00:00     
(12/12): updates/7/x86_64/filelists_db                           | 2.7 MB  00:00:01     
Determining fastest mirrors
Metadata Cache Created
7. 重新运用yum安装软件

 

 

 

原文地址 :https://blog.youkuaiyun.com/Homewm/article/details/80642738  

CentOS7使用yum安装时报错:failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try. 使用NAT模式,就是让虚拟系统借助NAT(网络地址转换)功能,通过宿主机器所在的网络来访问公网。也就是说,使用NAT模式可以实现在虚拟系统里访问互联网。NAT模式下的虚拟系统的TCP/IP配置信息是由VMnet8(NAT)虚拟网络的DHCP服务器提供的,无法进行手工修改,因此虚拟系统也就无法和本局域网中的其他真实主机进行通讯。采用NAT模式最大的优势是虚拟系统接入互联网非常简单,不需要进行任何其他的配置,只需要主机器能访问互联网即可。这种情况下,主机可以ping通虚拟机,虚拟机也能ping通主机。 阅读详情

相关推荐

failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try.

今天在Linux上面安装PostgreSQL的时候发生了 报错情况 failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try.看了一下报错分析貌似是yum源出现了问题,查了一些资料后进行尝试。

lg9706的博客 5578

yum安装程序报错:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

yum出现错误;linux

2201_75484372的博客 8777

yum镜像源问题:File contains no section headers.

报:File contains no section headers. 原因是没有配置yum源!解决如下: 第一种方案: 修改/etc/yum.repos.d/CenOS-Base.repo文件内容如下: #CentOS-Base.repo # #ThemirrorsystemusestheconnectingIPaddressoftheclienta...

C-A-L-D 1万+

解决failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try

failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try. https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes

helloworldchina的博客 1万+

立创EDA开源足轮机器人:基于STM32F407与ESP32的LQR自平衡与FOC驱动设计全解析

本文详细解析了基于立创EDA平台的开源足轮机器人项目。该项目采用STM32F407作为主控,ESP32负责无线通信,并应用LQR自平衡算法与FOC驱动技术,实现了机器人的稳定站立、移动转向及复杂地形适应能力。文章深入剖析了其硬件架构、软件设计及调试经验,为机器人运动控制学习提供了宝贵参考。

weixin_42608299的博客 232

10BASE-T1S协议中的PLCA机制:实现无碰撞网络传输的关键

本文深入解析了10BASE-T1S协议中的PLCA(物理层冲突避免)机制。作为IEEE 802.3cg标准的关键部分,PLCA通过循环调度与机会传递,从根源上避免了网络碰撞,为工业与汽车等场景提供了确定性的低延迟传输保障,是实现可靠实时通信的核心技术。

weixin_29250403的博客 209

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.HTTP ERROR 404- Not Found

今天给大家讲讲 yum 源404的解决方法, 报错图如下 我ping 百度 也是能ping通的 我在网上看了很多栗子说 :改 etc/yum.repos.d/Centos-7.repo 下面的$releasever 改成 7 ,$basearch 改成 x86_64 亲测无效, 有的说重装yum源 ,又是卸载又是下载的,对于我linux小白来说,操作起来费力又非脑,还麻烦 解决方案: 首先要知道,yum源404 无非就是没有找到这个yum 源,那么,我们...

Japhet_jiu的博客 1万+

2025年三级等保新规实战:从零开始搭建企业安全防护体系(附完整配置清单)

本文详细解析2025年三级等保新规的核心变化,提供从零开始搭建企业安全防护体系的实战指南。重点介绍动态防护能力、实战化攻防验证和全链路数据保护等关键要求,并附完整配置清单,帮助企业高效合规。

weixin_30836759的博客 468

执行yum报错:failure: repodata/repomd.xml from download.docker.....Errno 256] No more mirrors to try的解决方法

知识不缺页,状态无异常 ---- 小土豆Docker学习随笔

BaoBaoYuan 2万+

IEDA激活码失效?教你5分钟快速续期的方法

本文针对IEDA激活码失效问题,提供了一套从快速应急到深度排查的完整解决方案。文章不仅详解了5分钟快速续期与清理缓存等应急方法,更深入剖析了授权机制、离线激活流程,并指导如何构建可持续的授权管理策略,帮助开发者彻底解决激活困扰,确保开发环境稳定。

a0b1c2d3的专栏 273

使用Open3D进行RGB-D图像点云处理

在本文中,我们将使用Open3D来处理RGB-D图像,提取点云并进行一些基本的操作。总结起来,本文介绍了如何使用Open3D库处理RGB-D图像并提取点云。我们展示了如何读取RGB-D图像,创建RGB-D图像和点云,并显示点云。除了显示点云,Open3D还提供了许多其他功能,如点云滤波、点云配准、表面重建等。在创建RGB-D图像时,我们需要指定深度图像的缩放因子和截断值,以及是否将RGB图像转换为强度图像。希望本文能够帮助您入门Open3D,并在处理RGB-D图像和点云数据时提供一些指导。

QfcaLinux的博客 445

【Linux_Cent OS】yum错误:failure: repodata/repomd.xml from local: [Errno 256] No more mirrors to try.

root@centos7-9-2009-zsc ~ ] # yum makecache 已加载插件:fastestmirror拒绝连接" 正在尝试其它镜像。未知的错误" 正在尝试其它镜像。元数据缓存已建立。

十二_的博客 7968

Amesim应用篇-电芯等效电路模型标定

为了使计算模型更加准确,在有电芯实验测试数据的情况下,依据现有的实验数据对Amesim中的电池等效电路模型进行标定。标定的目的是为了获得更加符合项目实际情况的电芯等效电路模型,标定完的电芯可以用于搭建PACK模型,也可以用于其他虚拟实验。本文以充电标定为例,进行介绍。放电标定与充电一致。

2201_75375391的博客 1213

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try. http://download.nus.edu.

yum安装

qq_45275100的博客 608

NR PUCCH(一) PUCCH format 0/1

NR中PUCCH物理信道用来发送上行控制信息Uplink Control Information(UCI),当然UCI也可以在PUSCH上发送。UCI 内容包括:CSI,HARQ ACK/NACK ,SR 及上述三者的组合信息。 那先看下PUCCH format ,序列的生成及资源映射的相关内容。 NR中支持5种格式PUCCH,根据PUCCH format占用时域符号长度分为短PUCCH(1-2个符号,PUCCH 0/2)和长PUCCH(4-14个符号,PUCCH1/3/4)。使用短PUCCH 能够支

asd199086的博客 6060

Android Shadow插件化框架分析与集成(一)

到此为止,本篇文章先介绍到这里,本篇文章主要介绍了:从源码的角度去集成shadow框架,从下载源码开始,到集成到自己的项目中,其中插件项目我是新建的demo应用,宿主应用是之前搭的一个MVP框架。文章中一步一步详细的介绍了宿主该如何集成,并提供了源码;介绍了插件该如何集成,同时也提供了源码。文章中还介绍了gradle的版本与AGP版本使用不当造成的问题,以及shadow源码的gradle版本与APG版本的配置,及和宿主插件应用gradle版本与AGP版本的关系。

superzhang6666的博客 1235

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.成功解决版

yum install -y ntpdate Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org;

qq_74474809的博客 9652

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

安装docker报错failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try. ht

安装docker报错failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try. ht

Januea的博客 3759

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

Docker安装错误failure: repodata/repomd.xml from docker-ce-stable

一、出现该错的原因可能是因为设置了yum源导致的,我们可以通过重新配置yum源解决问题。 切换到/etc/yum.repos.d目录下,删除到只剩CentOS_Base.Repo这一个文件,也就是除CentOS_Base.Repo外,其他文件全部删除(用rm命令即可)。 [root@localhost ~]# cd /etc/yum.repos.d [root@localhost yum.repos.d]# [root@localhost yum.repos.d]# ll 总用量 44 -rw-r--r-

YouMing_Li的博客 1万+

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

yum提示 “Cannot retrieve metalink for repository: epel/x86_64” 的解决方法

今天在centos7服务器上用yum的时候发现,yum命令不能用了,不管用yum什么命令都会出现如下提示: 完整的错误提示如下 One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "

s_alted的博客 1万+

yum报错总结

问题1 nginx下载源配置完毕,但是无法下载,出现报错。 [root@m01 ~]# yum install -y nginx Loaded plugins: fastestmirror Determining fastest mirrors One of the configured repositories failed (Unknown), and yum doesn't have e...

weixin_43876317的博客 4711
上一篇: Mac 上 vmware fusion 的CentOS系统虚拟机网络配置
下一篇: Redis 安装使用
世樹
博客等级 码龄15年 37粉丝 45原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值