Redhat/CentOS 4.x End of Life Yum Repository Stops Working: Cannot find a valid baseurl for repo
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.