I was working on a Linux system that is running Fedora Core 4 and needed to install some updates to the system. I was using YUM because of the easy of use and how well it handles dependencies with rpms.
When trying to update the system I received the following error:
[root@yourlinuxbox ~]# yum -y update php
Setting up Update Process
Setting up repositories
Cannot find a valid baseurl for repo: updates-released
The system was unable to find where to locate the package repository. After doing a little research I found several pages stating that the baseurl line in their .repo files was commented out. When I tried uncommenting this line I still received the same error. Then I came across this page which gave me a clue. Although it was on a totally different subject, I noticed that the url that was posted in the output was different than the url that was in the baseurl line in my .repo files.
You have to forgive me, I didn’t keep the original url that was in the .repo files, all I can give you is what I changed it to. I changed the baseurl value in all .repo files in the /etc/yum.repos.d directory. For the Fedora Core 4 version of Linux change the baseurl value to:
http://download.fedoraproject.org/pub/fedora/linux/core/updates/4/i386/
Once I changed that value YUM was able to find the repository and search for the packages that I needed.
If you are interested in seeing where I was going with this, take a look at this post about updating PHP on Fedora Core 4.