Linux yum 报错:One of the configured repositories failed (Unknown), and yum doesn't have.

Stella981
• 阅读 935

报错信息

One of the configured repositories failed (CentOS-7 - Addons - sohu.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 addons
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=addons.skip_if_unavailable=true

failure: repodata/repomd.xml from addons: [Errno 256] No more mirrors to try.
http://mirrors.sohu.com/centos/7/addons/x86\_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
http://mirror.centos.org/centos/7/addons/x86\_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

解决方案

1.  请先确定你是无法联网还是配置问题。

ping www.baidu.com 如果是正常ping那可以看这个帖子完成配置

https://blog.csdn.net/weicuidi/article/details/52935100

2.  如果是 ping 有问题,那就:

      1. 在Linux系统中输入命令:   vi  /etc/sysconfig/network-scripts/ifcfg-ens33

      2. 修改文件中的ONBOOT=no,将no改为yes

      3. 重启服务: service network restart

在测试 ping 再去yum 应该可以了

点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
待兔 待兔
5个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Easter79 Easter79
3年前
tidb集群某个节点报错之:node_exporter
今天启动集群tidb时出现一个错误,是某个tikv节点报错:node\_exporter9100.service failed一个节点的问题会导致整个集群启动失败。去此节点下的日志文件中查找,发现没有什么报错原因。无奈此时只能去系统日志中查看发生了什么问题果然发现了问题Jan1615:35:05ip1723126133
DevOpSec DevOpSec
3年前
使用yum提示Error: rpmdb open failed
在centos系统上,在使用yum命令安装软件包时候报错:rpmdb:Thread/process6539/140448388269824failed:ThreaddiedinBerkeleyDBlibraryerror:db3error(30974)fromdbenvfailchk:DB_RUNRECOVERY:F
Wesley13 Wesley13
3年前
VBox 启动虚拟机失败
在Vbox(5.0.8版本)启动Ubuntu的虚拟机时,遇到错误信息:NtCreateFile(\\Device\\VBoxDrvStub)failed:0xc000000034STATUS\_OBJECT\_NAME\_NOT\_FOUND(0retries) (rc101)Makesurethekern
Wesley13 Wesley13
3年前
Oracle 12c DG备库Alert报错ORA
环境是12.2.0.1version,OracleDataGuard备库近段时间一直报错,但是备库主库同步一致,数据一致。20190306T23:42:22.18404808:00Errorsinfile/u01/app/oracle/diag/rdbms/ccdb/ccdb/trace/ccdb_m000_12
Stella981 Stella981
3年前
MariaDB install
Yum安装Maria//https://mariadb.com/kb/en/themariadblibrary/yum/\linux下安装MariaDB过程1、进站选版本,双击最后一项https://downloads.mariadb.org/mariadb/repositories/mi
Stella981 Stella981
3年前
Fedora21安装ZendServer之后yum报错
Fedora21安装ZendServer之后yum坏掉了...运行说pycurl:libcurllinktimeversion(7.20.1)isolderthancompiletimeversion(7.37.0)在源中手动下在了相关包重装了也不行,在网上搜索了一下,最后找到一个帖子http://netstu.
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Stella981 Stella981
3年前
Eclipse 中的Maven常见报错及解决方法
1.不小心将项目中的MavenDependencies删除报错!(https://oscimg.oschina.net/oscnet/fd35e500e2580bca2afb81f35233b87a6ee.png)项目报错:!(https://oscimg.oschina.net/oscnet/8623bd4293fea39ca83a6