One of the configured repositories failed(yum配置存储库失败)-程序员宅基地

技术标签: 运维  linux  centos  

在进行本地yum的基本配置时出现错误

错误代码:

One of the configured repositories failed (CentOS-7 - Media),
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=c7-media ...

 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 c7-media
    or
        subscription-manager repos --disable=c7-media

 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=c7-media.skip_if_unavailable=true

这段错误信息指的是“其中一个配置的存储库失败(CentOS-7-媒体),
并且yum没有足够的缓存数据继续。在这一点上,唯一可以做的安全的事情就是失败。

这个问题出现的原因可能是你之前修改过yum的源,然后你又对CentOS-Media.repo文件进行了修改,导致上一个yum库产生冲突

解决办法

  1. 下载一个新的源(这里我选择下载阿里云的源)
wget http://mirrors.aliyun.com/repo/Centos-7.repo
  1. 将下载的源替换原来的repo文件
mv Centos-7.repo CentOS-Media.repo

(如果没有CentOS-Media.repo可能为CentOS-Base.repo)

  1. 清理旧缓存数据,缓存新数据
yum clean all
yum makecache

(yum makecache的作用就是把服务器的包信息下载到本地电脑缓存起来)

  1. 最后出现metadata cache created(中文下显示为“元数据缓存已建立”)即已完成配置
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_53354912/article/details/126810960

智能推荐

Error: Failed to download metadata for repo ‘appstream‘: Cannot download repomd.xml: Cannot download_error: failed to download metadata for repo 'appst-程序员宅基地

文章浏览阅读4.2k次,点赞3次,收藏10次。使用liunx时报Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried错误的解决方法登录CentOS 8系统的ECS实例。运行以下命令备份之前的repo文件。rename '.repo' '.repo.bak' /etc/yum.repos.d/*.re_error: failed to download metadata for repo 'appstream': cannot download rep

【python】一小时掌握random模块从入门到精通系列_random 模块-程序员宅基地

文章浏览阅读805次。sample(seq, k)函数用于从序列seq中随机选择k个元素,返回一个列表。uniform(a, b)函数用于生成一个a到b之间的随机浮点数。randint(a, b)函数用于生成一个a到b之间的随机整数。choice(seq)函数用于从序列seq中随机选择一个元素。shuffle(seq)函数用于将序列seq中的元素随机排序。random()函数用于生成一个0到1之间的随机浮点数。(6) sample(seq, k)函数。(2) randint(a, b)函数。(1) random()函数。_random 模块

Ubuntu python3.6的安装_ubuntu python3.6安装-程序员宅基地

文章浏览阅读3.5k次。文章目录安装python3.6设置python优先级卸载Python参考资料安装python3.6'方法一'sudo add-apt-repository ppa:deadsnakes/ppasudo apt-get updatesudo apt-get install python3.6'方法二'sudo add-apt-repository ppa:jonathonf/python-3.6sudo apt-get updatesudo apt-get install python3.6_ubuntu python3.6安装

黑马程序员---对JPA的理解与回顾总…_jpa 黑马程序员-程序员宅基地

文章浏览阅读330次。接上文:多对多关系的映射:思路多对多关系是通过一个中间表或者说关联表来实现的,即两个多对一关系的综合就是一个多对多;1:首先确定好关系的维护端和被维护端;ManyToMany注解标识多对多对应的字段;指定关系的维护端是通过JoinTable注解来实现的,这个注解可以指定关联表的名称,和关联表的字段名称,其中joinColumns指定关系维护端这个字段对应于关联表的字段名称inv_jpa 黑马程序员

Data too long for column ‘数据库字段‘ at row 1_data too long for column at row 1-程序员宅基地

文章浏览阅读6.4k次。这个一般就是设计数据库字段的时候字段长度没给够,导致执行插入语句的时候,数据长度大于数据库对应字段长度报错。两种方法:1.对执行插入的数据长度做出限制,2.对数据库字段长度进行设置。记录一下今天执行sql语句的报错。_data too long for column at row 1

一文搞定OpenCV快速入门(附网盘链接)_opencv4快速入门pdf百度网盘-程序员宅基地

文章浏览阅读6.6k次,点赞15次,收藏13次。前言本系列包含两篇博客,主要分享OpenCV常用的操作,文末会分享相关著作电子版链接。传送门基础操作进阶操作资源链接:https://pan.baidu.com/s/1FlioORwwixsopfESgnsJpA提取码:aogg_opencv4快速入门pdf百度网盘

随便推点

SQLServer (MSSQLSERVER)请求失败或服务未及时反应_sqlserver服务开启报错未响应-程序员宅基地

文章浏览阅读3.4k次。计算机右键“管理”,查看日志:然后到SQLServer的配置管理器中把VIA协议禁用:然后启用SQLServer(MSSQLSERVER)。_sqlserver服务开启报错未响应

【报错】This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the-程序员宅基地

文章浏览阅读4.5k次。上述提示信息旨在告诉用户当前使用的 TensorFlow 二进制文件是经过优化的,并使用了一些 CPU 指令集来提高性能。加入这两行代码,把tensorflow的警告等级为2的警告忽略。这样,那些提示信息就不会再打印了,被隐藏了。上述提示中,有几个提示是GPU相关的,BZ电脑没有使用GPU。所以尝试换一种安装tensorflow的方法。_this tensorflow binary is optimized with oneapi deep neural network library

Unity 协程的原理_unity 协程原理-程序员宅基地

文章浏览阅读1.1w次,点赞9次,收藏52次。协程不是多线程,协程还是在主线程里面(注:在Unity中非主线程是不可以访问Unity资源的)1、线程、进程和协程的区别进程有自己独立的堆和栈,即不共享堆也不共享栈,进程由操作系统调度线程拥有自己独立的栈和共享的堆,共享堆不共享栈,线程亦有操作系统调度(标准线程是这样的)协程和线程一样共享堆不共享栈,协程由程序员在协程的代码里面显示调度一个应用程序一般对应一个进程,一个进程一般..._unity 协程原理

sourcetree 报错'git log' failed with code 128:'fatal: bad revision 'feature-xxx'-程序员宅基地

文章浏览阅读1.1w次。这个是由于建立分支后又删除了,会提示这个错,再建立这个分支即可,如果不需要推送到远程仓库不推送只在本地就好。_git log' failed with code 128:'fatal: bad revision

php 打开模态框,模态框打开页面-程序员宅基地

文章浏览阅读227次。## iframe打开页面1、为list表格增加链接按钮,将popup属性设置为true。属性modal-type用于调节模态框大小,有fs,lg,md(默认),sm,xs四种类型。~~~->addListButton(['type'=> 'edit','href_base'=> 'editQuestionBank','icon_class'=> 'fa fa-pencil..._php模态框按钮方法

ACM算法竞赛入门——算法竞赛赛制、题目形式、常见评测状态_算法赛-程序员宅基地

文章浏览阅读2.2k次,点赞33次,收藏48次。最全的acm算法竞赛赛制介绍、比赛、题目形式、常见测评状态_算法赛

推荐文章

热门文章

相关标签