centOS can't use yum update

December 12, 2014 24.6k views

As mencioned in previus post, I can not updare my centOS operative system hosted here.

Yum doesn't find his mirrors :(

[root@cityplanner ndrini]# yum check-update
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. 6.4 is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

My sistem version:

[root@cityplanner ndrini]# cat /etc/*release*
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
cpe:/o:centos:linux:6:GA

I tried this:

[root@cityplanner ndrini]# wget "http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os"
--2014-12-12 11:05:07--  http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
Resolving mirrorlist.centos.org... 72.232.223.58, 204.15.73.243, 64.235.47.134, ...
Connecting to mirrorlist.centos.org|72.232.223.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: “index.html?release=6&arch=x86_64&repo=os.1”

    [ <=>                                   ] 527         --.-K/s   in 0s      

2014-12-12 11:05:08 (61.7 MB/s) - “index.html?release=6&arch=x86_64&repo=os.1” saved [527]

But I get the same initial error.
Is there any special setting in digital ocean I have to set?

Andrea

2 comments
  • Does running yum clean all help? Check the contents of your /etc/yum.repos.d/CentOS-Base.repo file against this one, a copy from a fresh CentOS 6 droplet.

  • asb said:
    Does running yum clean all help?

    no :(

    [root@cityplanner ndrini]# yum clean all
    Loaded plugins: fastestmirror
    Cleaning repos: Webmin base epel extras updates
    Cleaning up Everything
    Cleaning up list of fastest mirrors
    
    [root@cityplanner ndrini]# yum check-update
    Loaded plugins: fastestmirror
    Determining fastest mirrors
    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
     Eg. 6.4 is not a valid release or hasnt been released yet/
    removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
    Error: Cannot find a valid baseurl for repo: base
    [root@cityplanner ndrini]# 
    
    

    And I can't remove no valid mirrors in
    /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
    because is empty.

    Changing the content of /etc/yum.repos.d/CentOS-Base.repo
    I get

    [root@cityplanner ndrini]# yum check-update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
     Eg. $releasever is not a valid release or hasnt been released yet/
    removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
    Error: Cannot find a valid baseurl for repo: base
    [root@cityplanner ndrini]# 
    

    :(

1 Answer

After doing some searching for others who had this issue it appears that manual recreation of the mirror list files is the best option.

You could follow the details in that thread updating to reflect 6.4 mirrors (the thread is about 5.9) or spin up a second, clean CentOS droplet and copy the files over via scp or SFTP.

Have another answer? Share your knowledge.