在 CentOS 5 上安装 yum

在 CentOS 5 上安装 yum

我目前正在开发一个 CentOS 虚拟机。我尝试更新yum,但它坏了,所以我将其删除。所以我需要在我的虚拟机上重新安装它,有人可以告诉我如何yum在 CentOS5 上安装吗?

答案1

从这个网站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

只要确保你的 centos 版本匹配即可

相关内容