我有一个基于Centos 6的VPS与ssh连接.最近想要安装
python 2.7.2,我勇敢地跑了:
yum remove python
这显然删除了yum本身正在编写或取决于python.
现在我不知道该怎么办,更糟糕的是,我是一个完整的Linux新手(命令行或其他).
运行rpm -iv http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/python-2.6.5-3.el6.x86_64.rpm给出:
Retrieving http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/python-2.6.5-3.el6.x86_64.rpm Preparing packages for installation... package python-2.6.5-3.el6.x86_64 is already installed
它的x86_64服务器毫无疑问,因为“uname -a”给出:
Linux xxxxxx 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
还有一件事:ls /usr/bin/pyth * -la给出:
lrwxrwxrwx 1 root root 6 Dec 4 20:31 python2 -> python -rwxr-xr-x 2 root root 4864 Nov 12 2010 python2.6 -rwxr-xr-x 2 root root 4864 Nov 12 2010 python;4edbd894
从
CentOS 6 mirrors列表中选择一个镜像,然后使用rpm安装所需的软件包.您需要处理依赖项.幸运的是,我有一个安装了CentOS 6 x86_64的裸机.
原文链接:https://www.f2er.com/centos/373924.html我快照VM,运行yum删除python并获得一些有趣的通过一些循环依赖.最后结果:
# --nodeps: because of circular dependency between python and python-libs rpm -i --nodeps http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/python-libs-2.6.5-3.el6.x86_64.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/python-2.6.5-3.el6.x86_64.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/pygpgme-0.1-18.20090824bzr68.el6.x86_64.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/python-pycurl-7.19.0-5.el6.x86_64.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/python-urlgrabber-3.9.1-7.el6.noarch.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/rpm-python-4.8.0-12.el6.x86_64.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/yum-Metadata-parser-1.1.2-14.1.el6.x86_64.rpm # --nodeps: because of circular dependency between yum and yum-plugin-fastestmirror rpm -i --nodeps http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm rpm -i http://centos.mirrors.hoobly.com/6.0/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
更换任何你想要的镜子.此外,请确保架构匹配.那应该可以做到这一点!
哦,还有一件事:如果我是你,我会在你完成安装RPM后立即进行yum升级.