首页 > 系统相关 >CentOS使用yum安装包报错No more mirrors to try解决方法

CentOS使用yum安装包报错No more mirrors to try解决方法

时间:2023-08-01 16:44:44浏览次数:41  
标签:repository centos -- CentOS try 报错 yum 安装包

报错如下

Loaded plugins: fastestmirror, update-motd
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/7-7.1908.0.el7.centos/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



 One of the configured repositories failed (CentOS-7-7.1908.0.el7.centos - 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. Run the command with the repository temporarily disabled
            yum --disablerepo=base ...

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

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

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.163.com/centos/7-7.1908.0.el7.centos/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

image
原因分析,源地址错误
处理方法

#进入源文件配置目录
cd /etc/yum.repos.d
#下载源
wget -O CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

修改

注意:把变量releasevr修改成对应的版本号,不同版本号可能不同

 sed 's#$releasever#7.9.2009#g' CentOS-Base.repo -i

不修改自动获取的如下
image
可以复制该地址尝试能否使用浏览器打开

标签:repository,centos,--,CentOS,try,报错,yum,安装包
From: https://www.cnblogs.com/minseo/p/17596927.html

相关文章

  • 用shell脚本写一个查询centos7的系统可用空间
    #!/bin/bash#byherofoxqq:42845734./etc/profile#通过显示系统空间,结合分割命令和awk命令来取数sys=$(df-h|grep-w"centos-root"|awk'{split($5,sys,"%");printsys[1]}')if[$sys-gt60]&&[$sys-lt100]thenecho'没有可用空间了,赶紧清理系......
  • 国标GB28181视频平台LntonGBS(源码版)国标平台出现报错“缺失dll文件”的问题解决方案
    LntonGBS是基于国标GB28181协议的视频云服务平台,它可以支持国标协议的设备接入,在视频能力上能实现直播、录像存储、检索与回放、云台控制、告警上报、语音对讲、平台级联等功能,既能作为业务平台使用,也能作为能力层平台调用。技术人员在用户服务器部署LntonGBS平台,提示缺失某个dll文......
  • CENTOS7下安装GRPC FOR CPP
    gRPC是一个高性能、开源和通用的RPC框架,面向移动和HTTP/2设计。目前提供C、Java和Go语言版本,分别是:grpc,grpc-java,grpc-go.其中C版本支持C,C++,Node.js,Python,Ruby,Objective-C,PHP和C#。gRPC基于HTTP/2标准设计,带来诸如双向流、流控、头部压缩、单TC......
  • centos7系统的初始环境配置
    (centos7系统的初始环境配置)一、配置yum仓库1.配置阿里的仓库源[root@192~]#curl-o/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-7.repo2.检测yum仓库[[email protected]]#yumrepolistall|grepenablebase/7/x86_64......
  • centos修改dns地址
    1、CentOS6.5设置静态IP、网关、配置DNS,解决ping不通外网问题2、Centos中IP与DNS手动设置方法3、主机无线上网,自动获取DNS,虚拟机上centos是桥接模式。DNS怎么设置CentOS6.5设置静态IP、网关、配置DNS,解决ping不通外网问题1、总结:上网配置好了之后,仍旧不能ping通外网......
  • 关于安装python包执行setup.py文件报错类似提示line 155 warnings.warn(f'Cannot copy
    首先可以确定世python语法问题,一般来说python3.6以后字符串使用f是没有问题的,后来发现问题所在,原来我安装好python以后,没有将python命令软连接到python3,导致python命令其实一直是使用的python2,所以才会有这样的问题。所以,当python3安装好以后,一定要重新指向软连接,还有pip3,也要指向......
  • CentOS7创建Python虚拟环境
    为python3创建软连接:ln-s/usr/local/anaconda3/bin/python/usr/bin/python3ln-s/usr/local/anaconda3/bin/pip/usr/bin/pip3查看版本:[root@centos-base~]#python3-VPython3.7.0[root@centos-base~]#pip3-Vpip10.0.1from/usr/local/anaconda3/lib/python......
  • git 通过husky提交代码报错导致代码丢失(只add了未commit的代码)
    项目中使用了eslint,以及lint-staged,在执行gitcommit时会触发git的pre-commit钩子,对代码做一次检查及格式化。由于个别文件中有TS报错,导致commit失败,并抛出了具体文件路径,当我在命令行点击路径时发现新增得文件没了(.ts、.vue、图片),仔细一看引用过这些文件得代码也没了,比如路......
  • ️Centos7下安装Oracle11GR2
    安装Oracle一直以来是比较头疼的事情,于是本文以图文并茂的方式进行安装步骤展示,参考知乎一位博主的安装:https://zhuanlan.zhihu.com/p/111710672,本文还额外提供了安装以及最后的一些数据库自启动配置操作。Oracle软件包地址:https://pan.baidu.com/s/1rQFXCsL44Nl-cXaLWVY9jQ?pwd......
  • C# 反序列化报错 XML 文档(1, 2)中有错误:不应有 <xml xmlns=''>
    1.XmlSerializer症状用XmlSerializer进行xml反序列化的时候,程序报错:​不应有<xmlxmlns=''>。​​说明: ​执行当前Web请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 ​异常详细信息: ​System.InvalidOperatio......