Centos yum problems

centosyum

I am really new to using linux and have just formatted my centos 5.2 vps and am trying to install links by using the command yum install links. But the following error gets displayed:

[root@inverses ~]# yum install links
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * lxlabsupdate: download.lxlabs.com
 * lxlabslxupdate: download.lxlabs.com
 * base: ftp.nluug.nl
 * updates: distrib-coffee.ipsl.jussieu.fr
 * addons: mirror.answerstolove.com
 * extras: distrib-coffee.ipsl.jussieu.fr
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/CentOS/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://distrib-coffee.ipsl.jussieu.fr/pub/linux/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.ukhost4u.com/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://centosh2.centos.org/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.atrpms.net/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://centosf.centos.org/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://centoso3.centos.org/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://centosk.centos.org/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://centosv.centos.org/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://centosk3.centos.org/centos/5.2/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

From what I gather after checking out some of the URLs to see if they exist or not is that they require a redirect from …/5.2/.. to just ../5/ Is this a common thing to have to change? and how could I change this?

Here is my CentOS-Base.repo http://pastebin.com/m67c1a022

Best Answer

5.3 is the current version, and it's recommended that you upgrade to that.

http://centosk3.centos.org/centos/5.2/readme

This directory (and version of CentOS) is depreciated.  For normal users,
you should use /5/ and not /5.2/ in your path. Please see this FAQ
concerning the CentOS release scheme:

http://www.centos.org/modules/smartfaq/faq.php?faqid=34

If you know what you are doing, and absolutely want to remain at the 5.2
level, go to http://vault.centos.org/ for packages.

You can modify the repo locations in /etc/yum.repos.d/

From what I understand /5/ should be a link to the latest 5.x version


Edit: Just saw the repo file you posted now.

[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=5.2&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

I don't have a centos machine around to check (don't use it anymore), but I believe that the mirrorlist line there has been modified, it should contain a variable for the version, not an actual number, like in the commented baseurl option.

Replace the 5.2 in the mirrorlist lines like:

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

With that done you should be able to yum upgrade to the next version. This is what the system should have done by default.