zoukankan      html  css  js  c++  java
  • centos 6.8 yum源不可用安装报YumRepo Error: All mirror URLs are not using ftp, http[s] or file

    问题场景

    今天在给环境装插件的时候,yum 提示报错如图:

     

     经过查询发现是自己的 yum 源有问题

    处理方案  

    //删除yum.repos.d目录下所有文件
    rm -f /etc/yum.repos.d /*    
    // 重新下载
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 

    下载完成后,CentOS-Base.repo文件内的baseurl依然不可使用,将其替换成https://vault.centos.org/6.8。例如:

    # 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 - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.8/os/x86_64/
    gpgcheck=1
    gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
    
    #released updates
    [updates]
    name=CentOS-$releasever - Updates - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.8/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
    
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.8/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.8/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
    
    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos-vault/6.8/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6

    至此处理结束

     yum clean all #清理缓存
     yum makecache #更新缓存
  • 相关阅读:
    GJM :动作手游实时PVP 帧同步(客户端)[转载]
    GJM :多人在线游戏的设计思路
    GJM : 中断被Socket.Accept阻塞的线程
    GJM :异步Socket [转载]
    GJM :C#开发 异步处理是目的,多线程是手段
    GJM : FlatBuffers 与 protobuf 性能比较 [转载 ]
    GJM : Protobuf -NET 相比Json 传输速度只需要1/3 解析只需要1/10
    GJM : Unity3D结合ZXING制作二维码识别
    GJM : Unity3D 常用网络框架与实战解析 【笔记】
    javascripct数组
  • 原文地址:https://www.cnblogs.com/wdh01/p/15715431.html
Copyright © 2011-2022 走看看