当我尝试在 CentOS 5.5 上安装 YUM 时出现依赖性错误

当我尝试在 CentOS 5.5 上安装 YUM 时出现依赖性错误

我正在 CentOS 5.5 上安装 YUM,并按照此页面中的说明进行操作:
http://wiki.openvz.org/Install_yum

我的系统是 x86_64。

我正在执行以下命令:

rpm -Uvh http://mirror.centos.org/centos-5/5.5/os/x86_64/CentOS/rpm-python-4.4.2.3-18.el5.x86_64.rpm

但随后我收到以下错误:

error: Failed dependencies:
popt = 1.10.2.3-18.el5 is needed by rpm-python-4.4.2.3-18.el5.x86_64
rpm = 4.4.2.3-18.el5 is needed by rpm-python-4.4.2.3-18.el5.x86_64
rpm-libs = 4.4.2.3-18.el5 is needed by rpm-python-4.4.2.3-18.el5.x86_64

有什么想法可以解决这个问题吗?

执行“yum clean”时出现此错误

There was a problem importing one of the Python modules required to run yum.
The error leading to this problem was: No module named rpm
Please install a package which provides this module,
or verify that the module is installed correctly.
It's possible that the above module doesn't match the current version of Python,
which is: 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]

更新 2
运行时rpm -q rpm rpm-libs popt,它给了我这个:

rpm-4.4.2.3-20.el5_5.1
rpm-libs-4.4.2.3-20.el5_5.1
popt-1.10.2.3-20.el5_5.1

答案1

您能否确认列出的依赖项已安装(包含这些版本)?通过提供以下输出:

rpm -q rpm rpm-libs popt

我认为您收到依赖性错误是因为版本不匹配(您安装了这些 RPM 的旧版本)。尝试使用相同的 rpm 命令更新这三个 RPM,然后重试。

答案2

可以尝试 yum clean all 然后尝试安装上面的 rpm

答案3

为何您的 CentOS-5.5 机器尚未安装 yum?

如果您按照此处的说明操作:

http://wiki.centos.org/TipsAndTricks/BrokenVserver

...那么你就应该能够得到一个可以工作的 yum。

答案4

可悲的事实是,像我一样,您购买了一台损坏的服务器。http://wiki.centos.org/TipsAndTricks/BrokenVserver

您必须选择支付额外费用让提供商为您“修复”问题,或者像我一样支付安装费并寻找另一家 VPS 托管提供商。强烈推荐 Linode。

相关内容