skip to Main Content

When try to use yum update on Centos6 I get this error: "Error: Cannot find a valid baseurl for repo: centos-sclo-rh."
Is there any way to get out of this error condition?


[root@4206-yv3 ~]$ yum update
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=6&repo=sclo-rh error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: centos-sclo-rh
[root@4206-yv3 ~]$

5

Answers


  1. You can try this one.

    echo "https://vault.centos.org/6.10/os/x86_64/" > /var/cache/yum/x86_64/6/base/mirrorlist.txt
    echo "http://vault.centos.org/6.10/extras/x86_64/" > /var/cache/yum/x86_64/6/extras/mirrorlist.txt
    echo "http://vault.centos.org/6.10/updates/x86_64/" > /var/cache/yum/x86_64/6/updates/mirrorlist.txt
    echo "http://vault.centos.org/6.10/sclo/x86_64/rh" > /var/cache/yum/x86_64/6/centos-sclo-rh/mirrorlist.txt
    echo "http://vault.centos.org/6.10/sclo/x86_64/sclo" > /var/cache/yum/x86_64/6/centos-sclo-sclo/mirrorlist.txt
    
    Login or Signup to reply.
  2. Since we’re talking about CentOS6 which reached its EOL, this is something expected. If you don’t want to worry about using yum clean all, navigate to /etc/yum.repos.d/ and adjust entries in CentOS-Base.repo.

    You’ll need to comment-out all lines starting with "mirrorlist=" and uncomment the ones starting with "baseurl=".

    The next thing is editing urls on "baseurl" lines – switch all "mirror.centos.org" entries with "vault.centos.org". For example, the first block should look something like this after you’ve edited it:

    [base]
    name=CentOS-$releasever - Base
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
    baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    
    Login or Signup to reply.
  3. I did not need SCL, so I removed /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo and this resolved the issue.

    Login or Signup to reply.
  4. because centos6 is EOL, for centos-sclo-rh , add below to CentOS-Base.repo

    [centos-sclo-rh]
    name=CentOS-6.10 - SCLo rh
    baseurl=http://vault.centos.org/centos/6.10/sclo/$basearch/rh/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
    
    [centos-sclo-sclo]
    name=CentOS-6.10 - SCLo sclo
    baseurl=http://vault.centos.org/centos/6.10/sclo/$basearch/sclo/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
    
    Login or Signup to reply.
  5. You can try:

    yum-config-manager --disable centos-sclo-sclo/x86_64

    or

    yum-config-manager --disable centos-sclo-rh/x86_64

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search