Centos – I get dependency error when I try installing YUM on CentOS 5.5

centosrpmyum

I'm in the process of installing YUM on CentOS 5.5 and following instructionsin this page:
http://wiki.openvz.org/Install_yum

My system is x86_64.

I'm executing the following command:

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

But then I get the following error:

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

Any ideas how I can fix this issue?

Doing 'yum clean' gives methis error

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)]

Update 2
Running rpm -q rpm rpm-libs popt, it gives me this:

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

Best Answer

Can you confirm that those dependencies listed are installed (with those versions)? By providing output of:

rpm -q rpm rpm-libs popt

I believe you're getting the dependency errors because the versions are not matching up (you have older versions of those RPM's installed). Try using that same rpm command to update those three RPM's and try again.