目录

错误现象

解决方法

第一步

第二步


错误现象

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 "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 <repoid>  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=<repoid>.skip_if_unavailable=true  Cannot find a valid baseurl for repo: base/7/x86_64 

解决方法

第一步

vi /etc/resolv.conf,添加下面一行就可以了

nameserver 114.114.114.114(这是国内的dns服务器系统,还是比较好用的。谷歌的可以使用8.8.8.8)

修改完后service network restart进行重启,试一下yum update命令,应该就可以了。如果还不可以,可以再进行下一步。

第二步

进入 /etc/yum.repos.d ,编辑vi CentOS-Base.repo,注释红色的部分 取消注释绿的部分(注释掉第一行,取消注释第二行就可以了)

# CentOS-Base.repo

#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

linux centos yum 报错 one of the configured repositories failed 解决方法相关推荐

  1. nginx 启动报错 “/var/run/nginx/nginx.pid“ failed” 解决方法

    nginx 启动报错 "/var/run/nginx/nginx.pid" failed" 解决方法 参考文章: (1)nginx 启动报错 "/var/run ...

  2. Centos yum命令报错One of the configured repositories failed(Unknown), and yum doesnt have.

    问题 今天网站证书失效了,想着更新一下,使用yum命令,结果就遇到了错误One of the configured repositories failed (Unknown), and yum doe ...

  3. linux centos yum 报错 [Errno 256] No more mirrors to try 解决方法

    目录 背景 报错信息 解决方案大致有三种 一.更新yum 二.若不行,可能是因为DNS不稳定吧,因为yum安装时会从三个"repo源"(base,extras,updates)随机 ...

  4. linux centos yum 报错 获取GPG密钥失败 Errno 14

    安装命令 sudo yum install docker-ce-18.03.0.ce 错误信息 安装 1 软件包 (+10 依赖软件包) 升级 ( 10 依赖软件包)总计:46 M Is this o ...

  5. linux find命令 报错 遗漏"-exec"的参数 解决方法

    错误示例 find ./jquery-ui/ -name "*svn" -exec rm -rf {}\; 这样写会报错,"find: 遗漏"-exec&quo ...

  6. linux c 编译报错 Compile error : undefined reference to‘__atomic_fetch_add_4’ 解决方法

    代码如下: #include <opencv2/opencv.hpp> using namespace cv;int main() {Mat img=imread("cornea ...

  7. linux报错Loading mirror speeds from cached hostfile解决方法 【yum错误记录】

    linux报错Loading mirror speeds from cached hostfile解决方法 1.ping百度显示网络不可达 vim /etc/sysconfig/network-scr ...

  8. Linux 安装yum报错Could not resolve host 转载

    Linux 安装yum报错Could not resolve host 已加载插件:langpacks http://update.cs2c.com.cn:8080/NS/V7/V7Update4/o ...

  9. 关于 CentOS系统编译Qt项目报错:error: cannot find -lGL 的解决方法

    若该文为原创文章,转载请注明原文出处 本文章博客地址:https://hpzwl.blog.csdn.net/article/details/129633859 红胖子(红模仿)的博文大全:开发技术集 ...

最新文章

  1. SQLServer2000 数据库恢复模型详解
  2. iOS开发:Objective-C优雅的语法
  3. vue Watcher分类 computed watch
  4. CEO 赠书 | 对失败的学习,决定了你成功的速度
  5. 在yuv域如何降低画面亮度_家庭影院投影机错误地调节了亮度和对比度会得到怎么样的画面?...
  6. Visual C# 2005 - 如何于DataGridView控件中以跨数据行方式显示数据
  7. SQL Server-【知识与实战VI】索引信息
  8. 大型央企云边协同建设方案及其借鉴意义分析
  9. 百度地图、腾讯地图坐标转换
  10. jeecms mysql_JeeCms的环境搭建 | 学步园
  11. Nodemcu 背篼酥课堂--物联网实战体系课程
  12. RAD Studio 10.4 for delphi XE Assigned和Nil的联系与区别
  13. node内存溢出问题 Javascript Heap out of memory
  14. 树莓派Android Things物联网开发:GitHub案例程序汇总
  15. [译] 使用 Espresso 隔离测试视图
  16. 游戏出海市场广阔,渠道差异及发行策略应受到企业关注
  17. Vue轻量级富文本编辑器-Vue-Quill-Editor
  18. ElasticSearch 2 (36) - 信息聚合系列之显著项
  19. 阿里云网站上线全套流程
  20. 计算机中的数制和编码教案,数制与编码教案

热门文章

  1. 如何画正太分布曲线_图解统计学 01 | 神奇的正态分布
  2. 互联网协议 — BGP 边界网关协议 — Router(路由器)
  3. FD.io/VPP — VPP Agent — Overview
  4. Overlay 网络 — Overview
  5. tls 流量画像——直接使用图像处理的思路探索,待进一步观察
  6. 监控利器Prometheus初探
  7. 数据量很大的排序问题 大量数据如何排序
  8. zabbix配置外部邮件服务器进行邮件报警
  9. Web服务器 Web容器 Servlet容器
  10. 软件测试2019:第四次作业