Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Cannot find a valid baseurl for repo: centos-sclo-rh

Tags:

centos

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 ~]$
like image 603
Frozen Feelings Avatar asked Sep 17 '20 03:09

Frozen Feelings


3 Answers

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
like image 141
dozer Avatar answered Nov 08 '22 12:11

dozer


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
like image 32
apapa Avatar answered Nov 08 '22 12:11

apapa


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
like image 37
matijal Avatar answered Nov 08 '22 12:11

matijal