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

前端 未结 14 1416
傲寒
傲寒 2020-12-30 03:30

I have set up a centOS 6.5 server using VMWare Workstation 9 on a Windows 8.1 host laptop. When trying to use yum to ins

14条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 03:54

    I faced the same problem with CentOS 5.11 and here complete solution file I ended up with :-

    nano /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
    # http://vault.centos.org/5.11/
    # http://vault.centos.org/5.11/updates/
    # 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
    baseurl=http://vault.centos.org/5.11/centosplus/$basearch/
    
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
    
    #released updates 
    [updates]
    name=CentOS-$releasever - Updates
    
    baseurl=http://vault.centos.org/5.11/updates//$basearch/
    
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
    
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    baseurl=http://vault.centos.org/5.11/extras/$basearch/
    
    
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
    #additional packages that extend functionality of existing packages
    
    
    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=http://vault.centos.org/5.11/centosplus/$basearch/
    
    
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
    
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    

提交回复
热议问题