• <span id="ycodp"></span>
    <span id="ycodp"><small id="ycodp"></small></span>
    1. <label id="ycodp"></label>
      <rt id="ycodp"><tr id="ycodp"><strike id="ycodp"></strike></tr></rt>
      <i id="ycodp"><strong id="ycodp"><ul id="ycodp"></ul></strong></i>
    2. 幫助中心

      這里有最新的使用文檔和教程

      < 返回

      CentOS6配置yum源,yum不能用怎么辦?

      2023-10-26 14:42 作者:31IDC 閱讀量:4368 所屬分類:Linux系統

      CentOS6配置yum源,yum不能用怎么辦?Centos6的yum不能用怎么辦?Command line error: no such option: -l

       

      項目開發需要使用到centos6.10和devtoolset-6。但是CentOS6官方于2020年11月30日已經停止維護,而Centos6系統自帶Yum想要連接舊版本的倉庫,因此想要解決yum安裝出現YumRepo Error: All mirror URLs are not using ftp, http[s] or file.報錯,我們需要更新陳舊版本的倉庫讓它指向可用的vault。

      第一步、備份原來的文件

      執行以下命令

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

       

      第二步、在/etc/yum.repos.d/ 目錄下新建一個文件CentOS-Base.repo ,添加以下內容

      # 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-6.10 - Base - mirrors.aliyun.com

      failovermethod=priority

      baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/

      gpgcheck=1

      gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

       

      #released updates 

      [updates]

      name=CentOS-6.10 - Updates - mirrors.aliyun.com

      failovermethod=priority

      baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/

      gpgcheck=1

      gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

       

      #additional packages that may be useful

      [extras]

      name=CentOS-6.10 - Extras - mirrors.aliyun.com

      failovermethod=priority

      baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/

      gpgcheck=1

      gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

       

      #additional packages that extend functionality of existing packages

      [centosplus]

      name=CentOS-6.10 - Plus - mirrors.aliyun.com

      failovermethod=priority

      baseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/

      gpgcheck=1

      enabled=0

      gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

       

      #contrib - packages by Centos Users

      [contrib]

      name=CentOS-6.10 - Contrib - mirrors.aliyun.com

      failovermethod=priority

      baseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/

      gpgcheck=1

      enabled=0

      gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

       

      第三步、執行以下命令, 使yum源生效

      yum clean all

      yum makecache

       

      至此,Centos 6 的yum就配置好了,您可以執行yum來安裝軟件或更新系統

      31IDC - 12 年深耕海外 IDC 高端資源

      主站蜘蛛池模板: 亚洲丁香色婷婷综合欲色啪| 日韩亚洲综合精品国产| 国产综合成人亚洲区| 国产成人亚洲综合网站不卡| 亚洲AV综合色区无码一二三区| 一本久久a久久精品综合夜夜| 91色综合综合热五月激情| 国产综合色香蕉精品五月婷| 色先锋资源久久综合5566| 狠狠色噜噜色狠狠狠综合久久 | 亚洲国产成人久久综合碰| 色综合伊人色综合网站| 亚洲Av综合色区无码专区桃色| 色婷婷综合久久久久中文一区二区 | 精品国产国产综合精品| 青青草原综合久久| 中文字幕亚洲综合小综合在线| 国产成人综合久久精品| 天堂久久天堂AV色综合| 亚洲精品国产综合久久久久紧| 久久综合狠狠综合久久97色| 激情综合亚洲色婷婷五月| 九九久久99综合一区二区| 99v久久综合狠狠综合久久| 久久综合噜噜激激的五月天 | 亚洲六月丁香婷婷综合| 色欲香天天综合网无码| 国产香蕉久久精品综合网 | 97色婷婷成人综合在线观看| 久久久综合香蕉尹人综合网| 天天做天天爱天天综合网| 亚洲精品欧美综合四区| 青草久久精品亚洲综合专区| 亚洲国产精品综合久久2007| 伊人久久综合影院| 天天综合网网欲色| 五月丁香六月综合缴清无码| 丁香六月激情综合| 色综合天天综合婷婷伊人| 狠狠色综合网站久久久久久久| 色噜噜狠狠狠狠色综合久一|