centos 7.1 - error repository

前端 未结 9 2153
失恋的感觉
失恋的感觉 2021-01-31 21:26

Hello I have download the minimal release of CENTOS 7 at this url link download ISO centos 7.x

All work correctly...the PING and the network is OK. I ping to external HO

相关标签:
9条回答
  • 2021-01-31 21:58

    Uncomment baseurl in this file: /etc/yum.repos.d/CentOS-Base.repo

    #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

    In this block:

    [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-7
    

    By uncomment, I mean change this: #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/, to this: baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ (remove the #).

    0 讨论(0)
  • 2021-01-31 21:58

    I had this problem in a company environment with MITM proxy after adding the EPEL repo with

    yum install epel-release
    

    This doesn't happen before (e.g. on yum update). I checked all answers and none of them fixed my problem. Figured out that the other repos use http by default, where epel use https:

    # grep mirror /etc/yum.repos.d/epel.repo
    metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch&infra=$infra&content=$contentdir
    metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch&infra=$infra&content=$contentdir
    metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch&infra=$infra&content=$contentdir
    

    So I copied our company root CA in the CentOS trust store and update it:

    cp /home/user/my-ca.crt /etc/pki/ca-trust/source/anchors/
    update-ca-trust
    

    After adding the cert, updating and installing packages from the EPEL repo works fine!

    0 讨论(0)
  • 2021-01-31 22:00

    Check your resolv.conf to see where your name server is pointing. Make sure it's something legit as mine was pointing to an old DNS server on the network that was wiped out. I updated it with the new IP address et voila!

    0 讨论(0)
提交回复
热议问题