Skip to content

Redhat/CentOS 4.x End of Life Yum Repository Stops Working: Cannot find a valid baseurl for repo

by Jon on April 25th, 2012

The Redhat/CentOS version 4.x recently hit its end of life for software updates and support. Below is the error you are likely to see if the repository has not been updated.

[root@localhost ~]# yum update
Setting up Update Process
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

If you still have servers out there and don’t want to upgrade to CentOS 5 or 6 then the repository file will need updating for yum to continue working.

Just copy and paste the following commands into the terminal.

mv /etc/yum.repos.d/CentOS-Base.repo /tmp
yum clean all
wget http://jonathanmanning.com/wp-content/uploads/2012/04/CentOSVault.repo_.txt
mv CentOSVault.repo_.txt /etc/yum.repos.d/CentOSVault.repo

Now try using the yum update command.

From → Linux, Tech

19 Comments
  1. Federico permalink

    I had to install some packages on an old Centos 4 server and your post saved me a lot of searches/work!

    Thank you :)

  2. red permalink

    thank you

  3. Attila permalink

    thanks for the help! saved me a lot of pain :-) keep up the good work!

  4. Pandit permalink

    Thank you. It works for me also saved lot of time :-)

  5. Marco permalink

    WOW Man thank you, you saved my life <3 !!!!!!!!!!!!!!

    TTTTTTTHHHHHHHHHHHXXXXXXXX

  6. Rodney permalink

    This fixed my problem.
    Thanks very much.

  7. phiop permalink

    Thanks a lot, that helped me much!

  8. PaST permalink

    Is working.

  9. Wow, finally a working old Centos repo.
    Thank u very much Jonathan :)

  10. Donald permalink

    This was driving me insane, tyvm for the fix

  11. Joan permalink

    Perfect!!!!

    Copy-paste y …. funciona!!!

    Gracias

  12. stefano permalink

    thanks a lot !

  13. Tyler permalink

    so, i know this is a really old post. but. i’m currently creating a backup of one of our local storage sites, at the moment, it would up update hell if i were to try and upgrade to centos 6 or anything else because of all the dependencies. so i just want to use 4.8 at the moment. im trying to do a net install of 4.8, but i am lost at how no one seems to have a url i can use.

    Can You Help Me!!!!!
    PLEASE

    Tyler.

  14. prem permalink

    Thanks a lot.!!

  15. Sudarvendan permalink

    Thank you so much…. it is working

  16. Thank you so much for help …. it’s working

  17. Jonathan Diaz permalink

    Thank’s man! Fix the error in my centos 4.4 and do my homework for my university! LOL!

  18. Zaur permalink

    Thank you very much! Your solution helped me.
    Have a good day :)

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

%d bloggers like this: