zoukankan      html  css  js  c++  java
  • YumRepo Error: All mirror URLs are not using ftp, http[s] or file.centos6 yum失败!

    具体在使用yum安装wget的时候,报了如下的错误

     原因:centos6的默认源在2012年-12月左右被官方搞掉了

    第一种方法:一键修复(一条一条执行即可):

    一般执行了前3条命令就好了

    sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo 
    yum clean all
    yum makecache

    第二种方法:手动修复教程:

    首先把fastestmirrors关了

    vi /etc/yum/pluginconf.d/fastestmirror.conf

     enable=0

    先把之前的repo挪到备份,然后下面两个二选一

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

    替换为官方Vault源

    curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Official.repo

    替换为阿里云Vault镜像

    curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
  • 相关阅读:
    [NOIP2020]T2字符串匹配
    【CSGRound2】逐梦者的初心(洛谷11月月赛 II & CSG Round 2 T3)
    【CF1225E Rock Is Push】推岩石
    [HAOI2016]食物链
    求先序排列
    图书管理员
    合并果子
    联合权值
    和为0的4个值
    玩具谜题
  • 原文地址:https://www.cnblogs.com/zouhong/p/14600512.html
Copyright © 2011-2022 走看看