0

I have a CentOS vm that I'm currently working on. I tried to update yum and it broke, so I removed it. So I need to re-install it on my vm, can anybody tell me how to install yum on CentOS5?

1 Answer 1

1

From this site http://imountain.com/blog/2008/09/13/how-to-install-yum-manually-on-redhatrhel-4x-or-centos-4x/

rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-2.6.16-10.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-python-2.6.16-10.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-python-4.3.3-22_nonptl.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/i386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm
rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/x86_64/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm

Just make sure your centos version match up

2
  • Just give the full list of packages in one rpm command, or it might well choke on missing dependencies. Or just whip out yur installation/rescue disk, and install yum using that (look up exact details, memory is rather fuzzy as it's been a long time since I had such an "accident"). Good luck!
    – vonbrand
    Jan 23, 2013 at 13:48
  • This answer is no longer applicable, because the mirror is now offline. Jan 24, 2021 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .