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

前端 未结 14 1471
傲寒
傲寒 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 04:12

    For anybody else stuck in the past,

    From within a docker container centos:centos5

    # cat CentOS-Base.repo
    [base]
    name=CentOS-5.11 - Base
    #mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=os
    baseurl=http://archive.kernel.org/centos-vault/5.11/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
    #released updates
    [updates]
    name=CentOS-5.11 - Updates
    #mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=updates
    baseurl=http://archive.kernel.org/centos-vault/5.11/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
    #packages used/produced in the build but not released
    [addons]
    name=CentOS-5.11 - Addons
    #mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=addons
    baseurl=http://archive.kernel.org/centos-vault/5.11/addons/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    
    #additional packages that may be useful
    [extras]
    name=CentOS-5.11 - Extras
    #mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=extras
    baseurl=http://archive.kernel.org/centos-vault/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-5.11 - Plus
    #mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=centosplus
    baseurl=http://archive.kernel.org/centos-vault/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-5.11 - Contrib
    #mirrorlist=http://mirrorlist.centos.org/?release=5.11&arch=$basearch&repo=contrib
    baseurl=http://archive.kernel.org/centos-vault/5.11/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    

    I had to also change this libselinux.repo

    # cat libselinux.repo
    [libselinux]
    name=CentOS-$releasever - libselinux
    baseurl=http://archive.kernel.org/centos-vault/5.11/os/$basearch/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    includepkgs=libselinux*
    

提交回复
热议问题