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
You can try this one.
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:
I did not need SCL, so I removed
/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
and this resolved the issue.because centos6 is EOL, for centos-sclo-rh , add below to CentOS-Base.repo
You can try:
yum-config-manager --disable centos-sclo-sclo/x86_64
or
yum-config-manager --disable centos-sclo-rh/x86_64