ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • yum error 정리: Cannot find a valid baseurl for repo: base
    ■ 아빠 프로그래밍/Linux 2021. 6. 9. 09:13
    반응형

     

     

     

     

     

     

    OS : CentOS 6

     

    yum 사용시 발생 error

    ==========================================================

    Loaded plugins: fastestmirror, security
    Setting up Install Process
    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/x86_64/6/base/mirrorlist.txt
    Error: Cannot find a valid baseurl for repo: base

    ==========================================================

     

    CentOS-Base.repo 수정

    # vi /etc/yum.repos.d/CentOS-Base.repo

     

    원본 내용 : ==================================================

    [base]
    name=CentOS-$releasever - Base
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
    #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

    #released updates
    [updates]
    name=CentOS-$releasever - Updates
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
    #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
    #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
    #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
    #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

    ==========================================================

     

    수정 내용 : ==================================================

    [C6.10-base]
    name=CentOS-6.10 - Base
    baseurl=http://vault.centos.org/6.10/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    enabled=1
    metadata_expire=never
     
    [C6.10-updates]
    name=CentOS-6.10 - Updates
    baseurl=http://vault.centos.org/6.10/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    enabled=1
    metadata_expire=never
     
    [C6.10-extras]
    name=CentOS-6.10 - Extras
    baseurl=http://vault.centos.org/6.10/extras/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    enabled=1
    metadata_expire=never
     
    [C6.10-contrib]
    name=CentOS-6.10 - Contrib
    baseurl=http://vault.centos.org/6.10/contrib/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    enabled=0
    metadata_expire=never
     
    [C6.10-centosplus]
    name=CentOS-6.10 - CentOSPlus
    baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    enabled=0
    metadata_expire=never

    ==========================================================

     

    yum repolist 처리

    # yum repolist

    처리 내용 : ==================================================

    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile
    repo id                                                    repo name                                                          status
    C6.10-base                                                 CentOS-6.10 - Base                                                 6,713
    C6.10-extras                                               CentOS-6.10 - Extras                                                  47
    C6.10-updates                                              CentOS-6.10 - Updates                                              1,193
    repolist: 7,953

    ==========================================================

     

     

     

    참고 : 

    https://xinet.kr/?p=3072 

     

    centos 6 Error: Cannot find a valid baseurl for repo: base

    error 

    xinet.kr

     

     

     

     

     

     

     

     

     

    반응형
Designed by Tistory.