配置YUM源出现Errno 14 Could not open/read repomd.xml 或者 "Couldn't open file /mnt/cdrom/repodata/repomd.xml" 错误的解决办法
报错信息:

[root@tcljr-jdh-uat007 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/cdrom/repodata/repomd.xml"
Trying other mirror. One of the configured repositories failed (xdn),
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. Run the command with the repository temporarily disabled
yum --disablerepo=xdn ... 4. Disable the repository permanently, 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 xdn
or
subscription-manager repos --disable=xdn 5. 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=xdn.skip_if_unavailable=true failure: repodata/repomd.xml from xdn: [Errno 256] No more mirrors to try.
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/cdrom/repodata/repomd.xml"
[root@tcljr-jdh-uat007 yum.repos.d]# cd /mnt/repo
-bash: cd: /mnt/repo: No such file or directory

上述中的repodata/repomd.xml文件据说是/mnt目录rpm包的目录,路径
在/mnt中因为没有/repodata/repomd.xml 这个文件,所以提示出错,其实不是网上所说的软件库路径的问题。这也是明明在/mnt下看到我们要安装的包,而提示没有的缘故。
解决办法:
网上有各种办法:
第一种:解决办法就是把本地源关闭:将/etc/yum.repos.d/CentOS-Media.repo里面的enabled=1改成enabled=0即可,因为yum寻包的顺序应该先是本地源,再寻网络源。
第二种:解决方法就是重新配置生成repomd.xml文件。
以上述base为例,生成新的repomd.xml:[root@yanta ~]# cd /mnt/repo
[root@yanta repo]# creatrepo ./base/
或许各自的实际情况不一样,上述方法并没有解决问题,经过一番验证后,发现另一种方法:通过一台正常服务器,获取yun源文件,然后替换该服务器yum源文件,结果正常了;
提供正常使用yum源文件:https://download.csdn.net/download/yang5726685/75666689
操作前可以先备份原有的yum源,然后替换即可,替换路径为:
/etc/yum.repos.d
清除缓存 生成新的缓存
yum clean all yum makecache
最后,通过命令查看配置好的yum源是否正常:yum repolist。
配置YUM源出现Errno 14 Could not open/read repomd.xml 或者 "Couldn't open file /mnt/cdrom/repodata/repomd.xml" 错误的解决办法的更多相关文章
- linux配置yum源
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- redhat 6 配置 yum 源的两种方法
由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重启安装,再配置其他源. 本文包括配置本地源及第三方源.第三方源包括:网易,epe ...
- CentOS / RHEL 配置yum源
CentOS / RHEL 配置yum源 */--> CentOS / RHEL 配置yum源 Table of Contents 1. 前言 2. 关于yum 2.1. yum是什么 2.2. ...
- RHEL 7.0 本地配置yum源
RHEL 7.0 本地配置yum源 yum简介 yum = Yellow dog Updater, Modified 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它 ...
- CentOS7.1 JDK安装 和 CentOS7.1配置yum源
1.卸载自带OPENJDK #查看自身jdk java -verson #查看自身安装的java rpm -qa | grep java #显示如下 python-javapackages-3.4. ...
- 在redhat6下配置yum源的使用
有好多朋友使用linux redhat版本是不是还在为rpm包的安装而烦恼,yum工具的使用无意是解决这一难题的好工具,他可以解决包安装中依赖问题,但是对于redhat版本的系统来说如果 ...
- RedHat 6配置yum源为网易镜像(转)
概述 由于版权的问题,RedHat6不能直接使用yum一些指令,需要配置yum源为网易镜像,但是网上谈到很多:整理一下,将有用的信息整理如下,以便于能够为其他的配置服务配置使用:需要卸载掉原理系统自带 ...
- Linux 配置yum源.
Linux 配置yum源. 环境:虚拟机中安装了RedHat ,在进行安装mariadb的时候,出现如下错误.是因为yum源的问题,需要进行配置yum源.本教程是配置本地yum源. [root@loc ...
- redhat 配置yum源(配置163 yum repo)
一般安装好redhat后,不能注册的话,不能使用系统自带的yum源.但是我们可以自己配置yum源来解决这一问题.下面介绍下redhat配置163yum源. 1) 查看版本号和系统类别: cat /et ...
- 05: 配置yum源
1.1 将镜像复制到本地创建yum源 1.将准备好的系统镜像放到指定的目录,本次目录指定在:/dawnfs/sourcecode 2.创建挂载目录:mkdir /mnt/yum 3.挂载镜像: mou ...
随机推荐
- Android :安卓学习笔记之 Handler机制 的简单理解和使用
目录 Handler机制 1.Handler使用的引出 2.背景和定义 3.作用和意义 4.主要参数 5.工作原理及流程 5.1.对应关系 6.深入分析 Handler机制源码 6.1.Handler ...
- 2024年4月中国数据库排行榜:OceanBase再度登顶,KingBase稳步上升进前五
春风劲吹,迎来了2024年4月中国流行度排行榜.纵观本月榜单,各家数据库产品你追我赶,名次呈现微妙变动,它们正以不可忽视的力量,推动着中国乃至全球的数据管理革新.在这春意盎然的四月,让我们继续关注这些 ...
- DDD之领域服务与应用服务
领域服务: 聚合中的实体没有业务逻辑代码,只有对象的创建,对象的初始化,状态管理等个体相关的代码: 对于聚合内的业务逻辑,我们编写领域服务Domain service 而对于聚合协作以及聚合与外部系统 ...
- 3. 用过Konva吗,用过他的api吗
基础:使用konva,首先需要创建舞台也就是stage,然后创建一个Layer图层,将图层放到舞台上,将图形等内容放到图层上 ; 第一步:创建一个Stage舞台 , 就是创建一个 stage 实例 ...
- python的十大数据结构之堆队列heapq(heap queue)
heap queque(堆队列),是一个完全二叉树,并且满足一个条件:每个节点(叶节点除外)的值都大于等于(或小于等于)它的子节点.提供了构建小顶堆的方法和一些小顶堆的基本操作方法(如入堆.出堆等), ...
- Win11使用Translucent TB设置Windows导航栏透明失败解决方案
Win11使用Translucent TB设置Windows导航栏透明失败解决方案 Translucent TB下载方式:直接在Windows自带的Microsoft应用商店里面搜索下载就可以了 1. ...
- Nuxt.js 应用中的 app:resolve 事件钩子详解
title: Nuxt.js 应用中的 app:resolve 事件钩子详解 date: 2024/10/17 updated: 2024/10/17 author: cmdragon excerpt ...
- 网络波动下的救星:ToDesk云电脑性能测试,以赛博朋克2077、巫师3为例
随着网络技术的不断发展,云电脑作为一种新兴的云端计算机逐渐进入大众视野.对于游戏玩家而言,云电脑不仅解决了高配置电脑价格昂贵的问题,还让玩家在任何网络环境下随时随地享受高性能的游戏体验. 特别是在网络 ...
- Windows编译运行webrtc全过程,并实现屏幕共享
文章分为三部分,代码获取/编译/运行. 第一步获取代码,打开cmd执行以下指令即可 set WORKSPACE=E:\webrtc mkdir %WORKSPACE% cd /d %WORKSPACE ...
- Air780EP低功耗4G模组AT开发:阿里云应用
Air780EP是合宙推出的一款低功耗4G全网通模组,兼容模组行业1618经典封装,支持OpenCPU开发及全功能数传AT开发,可广泛应用于多样化的物联网终端. 针对客户朋友需求反馈,本期特别推出 ...