Linux – Expired CentOS not so yummy

After a year away, yum thinks my CentOS build hasn’t been released yet.

Resurrecting an elderly CentOS 4.8 development environment for some maintenance work, I was somewhat surprised by the error message yum gave me when I tried to add some packages from the distro.

# yum list
Setting up repositories
not using ftp, http[s], or file for repos, 
    skipping - 4 is not a valid release or hasnt been released yet
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update

Er, not released yet? Not a valid release? Okay, I was helping this server up and down the stairs the last time I used it, but reports of its death certainly hadn’t reached me while I’d been away.

Not wanting the hassle of upgrading this stable, little used environment  to allow me to do a few hours work, I had a poke around in /etc/yum.repos.d/CentOS-Base.repo and tried the baseurl in my web-browser:-

This directory (and version of CentOS) is depreciated.

CentOS-4 is now past EOL

You can get the last released version of centos 4.9 here:

http://vault.centos.org/4.9/

Having located the CentOS graveyard, a quick nosey on  http://vault.centos.org/ revealed the repo file I needed to make yum eat its expired food:-

# cd /etc/yum.repos.d
# mv CentOS-Base.repo CentOS-Base.repo.backup
# wget http://vault.centos.org/4.8/CentOS-Base.repo

Easier than upgrading, Googling for RPMs or fishing out the original media. Hey, if it ain’t broke, why fix it?

3 responses to “Linux – Expired CentOS not so yummy

  1. Thanks, you saved me–and anyone else nursing old systems–a bunch of pain updating bash for the shellshocked bug.

  2. Thank you very much~!!!
    legacy system is so old, nowhere using centos 4.8 but your posting is useful for me.
    thanks again. I’m Korean. I think korea is so Far from your place.

  3. Thank you for taking the time to share this! Saved me a big headache!

Leave a Reply

Your email address will not be published. Required fields are marked *