我在这里使用:
Centos 5.5
错误地我做了
yum remove yum
现在我想重新尝试许多无法使用的方法
我试过了。
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/gmp-4.1.4-10.el5.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/readline-5.1-3.el5.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/python-2.4.3-44.el5.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/libxml2-2.6.26-2.1.12.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/libxml2-python-2.6.26-2.1.12.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/expat-1.95.8-8.3.el5_5.3.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/sqlite-3.3.6-5.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/elfutils-libelf-0.137-3.el5.x86_64.rpm
rpm --nodeps -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/elfutils-0.137-3.el5.x86_64.rpm
rpm --nodeps -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/rpm-4.4.2.3-22.el5.x86_64.rpm
rpm --nodeps -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/rpm-python-4.4.2.3-22.el5.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/m2crypto-0.16-8.el5.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
rpm --nodeps -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
rpm -Uvh http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
yum -y update
不工作.... 结果 -bash:/ usr / bin / yum:没有这样的文件或目录
答案 0 :(得分:2)
当你运行上面的命令时,你没有提到你是否有任何错误,但我通过全新安装CentOS 5.5并做“yum erase yum”来复制你的问题。这也删除了包“yum-fastermirror”和“yum-updatesd”作为依赖项。
然后,我做了以下事情:
# wget http://mirror.symnds.com/distributions/CentOS-vault/5.5/os/x86_64/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
# wget http://mirror.symnds.com/distributions/CentOS-vault/5.5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
# rpm -Uvh *.rpm
(如果您不想使用我使用过的镜子,请随意使用您最喜欢的vault.centos.org镜像。)
这会把“yum”放回去(它需要“yum-fastermirror”作为依赖,而“yum-fastermirror”依赖于“yum”,所以这是我能想到的最快的方式同时重新安装两者)。
之后,“yum”正在运行,我可以使用“yum -y update”(有效地将系统升级到CentOS 5.10)。