zoukankan      html  css  js  c++  java
  • yum安装时候报错:Error: Cannot find a valid baseurl for repo: base

    Determining fastest mirrors

    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

     Eg. Invalid release/repo/arch combination/

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

    Error: Cannot find a valid baseurl for repo: base

    在网上找了很多的方法,但是都不起作用:

    最终解决方案:

    #sed -i "s|enabled=1|enabled=o|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 -y install gcc*就没有报错了。

  • 相关阅读:
    C 扩展库
    访问nginx时验证密码
    关于redis闪退的案例
    查看进程的准确启动时间
    Ansible随笔8
    Ansible-随笔-7
    运维基本工作
    随笔-ansible-6
    随笔-ansible-5
    随笔-ansible-4
  • 原文地址:https://www.cnblogs.com/yyl6/p/14279138.html
Copyright © 2011-2022 走看看