首页 > 系统相关 >centOS6.5 无法使用yum源的问题 removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirror

centOS6.5 无法使用yum源的问题 removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirror

时间:2023-11-07 15:56:04浏览次数:22  
标签:CentOS mirrors cache repo etc Base yum mirrorlist

 

一次在临时服务器执行 yum命令出现报错问题:

removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt  ......

1、修改fastestmirror.conf的配置参数

sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf

2、备份文件

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

3、下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo

推荐使用安全方式连接:wget --no-check-certificate -O CentOS-Base.repo  h    ttps://mirrors.aliyun.com/repo/Centos-6.repo

4、替换源文件配置, 使用https://mirrors.aliyun.com/centos-vault/
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
5、替换http成https
sed -i 's/http/https/g' /etc/yum.repos.d/CentOS-Base.repo
6、替换版本,$releasever替换6.5, 6.5是当前centOS版本
sed -i 's/$releasever/6.5/g' /etc/yum.repos.d/CentOS-Base.repo
7、替换centos为centos-vault
sed -i 's/centos/centos-vault/g' /etc/yum.repos.d/CentOS-Base.repo
8、清掉所有索引缓存&& 生成yum索引缓存
yum clean all && yum makecache

问题解决

 

标签:CentOS,mirrors,cache,repo,etc,Base,yum,mirrorlist
From: https://www.cnblogs.com/ll666/p/17815174.html

相关文章

  • centos 6更改yum
    环境:OS:Centos6 1.备份现有repo仓库mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.backup2.使用阿里云仓库repocurl-o/etc/yum.repos.d/CentOS-Base.repohttps://www.xmpan.com/Centos-6-Vault-Aliyun.repo--insecurecurlhttp://www.xmpan......
  • Linux下内存buff/cache占用过多问题解决
    在Linux下经常会遇到buff/cache内存占用过多问题,如果buff/cache占用过大的,free空闲内存就很少,影响使用;通常内存关系是:普通机器:total=used+free虚拟机器:total=used+free+buff/cache这个时候可以看到buff/cache占用的内存非常大,这个时候可以使用一下命令去清除一下cache内存echo1>......
  • Centos配置本地yum源为ISO镜像
    一、创建挂载路径mkdir/mnt/iso二、挂载ISO镜像到目录cd/soft/sudomount-oloopcentos-7-x86_64-everything-2009.iso/mnt/iso三、挂载验证 配置成系统启动自动挂载vi/etc/fstab加上一行:/soft/centos-7-x86_64-everything-2009.iso/mnt/isoiso9660......
  • centos7中使用yum安装tomcat以及它的启动、停止、重启
    介绍ApacheTomcat是用于提供Java应用程序的Web服务器和servlet容器。Tomcat是ApacheSoftwareFoundation发布的JavaServlet和JavaServerPages技术的开源实现。本教程介绍在CentOS7服务器上使用yum进行Tomcat7的基本安装和一些配置。请注意,这将安装在官方Ubuntu存储库中的......
  • yum install 报错Error downloading packages
    yuminstallntp报以下错误:Errordownloadingpackages:autogen-libopts-5.18-5.el7.x86_64:[Errno5][Errno2]Nosuchfileordirectoryntp-4.2.6p5-29.el7.centos.2.x86_64:[Errno5][Errno2]Nosuchfileordirectoryntpdate-4.2.6p5-29.el7.centos.2.x86_64:......
  • yum update (python)
    yumupdate Traceback(mostrecentcalllast): File"/usr/bin/yum",line29,in<module>   yummain.user_main(sys.argv[1:],exit_code=True) File"/usr/share/yum-cli/yummain.py",line375,inuser_main   errcode=main(args) Fi......
  • Springboot Cache @Cacheable 类内部调用时不生效,解决办法
    出现问题的原因:Springcache的实现原理是基于AOP的动态代理实现的:即都在方法调用前后去获取方法的名称、参数、返回值,然后根据方法名称、参数生成缓存的key(自定义的key例外),进行缓存。this调用不是代理对象的调用,所以aop失效,注解失效。解决办法就是,我们获取当前Bean,由它来调......
  • in org.springframework.cache.annotation.ProxyCachingConfiguration required a be
    我的项目是springboot项目,在启动过程中报错如何下Parameter0ofmethodcacheAdvisorinorg.springframework.cache.annotation.ProxyCachingConfigurationrequiredabeanoftype'org.springframework.cache.interceptor.CacheOperationSource'thatcouldnotbefound......
  • influxdb报错:cache-max-memory-size exceeded
    转载请注明出处:influxdb报错日志: 该错误信息表示InfluxDB引擎超过了缓存最大内存大小。这意味着InfluxDB的缓存使用量超出了配置的限制。要解决此问题,可以采取以下步骤来定位和解决:检查配置文件:首先,请确保InfluxDB配置文件中没有设置错误。在配置文件......
  • yum安装nginx-源码编译安装nginx
    #nginx官网http://nginx.org/#nginx主要代理七层协议,也就是应用层;nginx是一个高性能HTTP和反向代理,负载均衡服务器.............#nginx默认端口是80#https默认端口是443#官网查看安装步骤http://nginx.org/——>documentation——>Installingnginx——>InstallationonLinux,pac......