1

I am running Red Hat Enterprise Linux 6.9, and I cannot find the RPM Python bindings?

I am trying to install rpm-py-installer-0.7.0 and it throws an error:

RPM Python binding on system Python should be installed manually.
Install the proper RPM package of python{,2,3}-rpm.

So, I searched the Internet, and found RPM Python bindings, but nothing for RHEL 6... I tried using pip and yum to install python2-rpm, but it found nothing (the package does not exist).

I need to be able to install python2-rpm so that I can get rpm-py-installer installed.


Here is the code that is failing:

if self.python.is_system_python():
            if self.python.is_python_binding_installed():
                message = '''
RPM Python binding already installed on system Python.
Nothing to do.
'''
                Log.info(message)
                raise InstallSkipError(message)
            else:
                message = '''
RPM Python binding on system Python should be installed manually.
Install the proper RPM package of python{,2,3}-rpm.
'''
                raise InstallError(message)

Basically...

self.python.is_python_binding_installed()

... is returning false.

2
  • 1
    Have you tried yum install rpm-python ? That's in the CentOS6.9 base so I assume it's available on RedHat. It includes the /usr/lib64/python2.6/site-packages/rpm directory. Jun 27, 2018 at 22:43
  • I ran yum install rpm-python and it said it was already installed...
    – Erik343
    Jun 27, 2018 at 23:08

2 Answers 2

1

I assume you can install the package with following command.

yum localinstall rpm-py-installer-0.7.0

In normally, as you know, yum util is getting packages from repositories throughthe network.
But in this case, you have already downloaded rpm-py-installer-0.7.0 from internet to your server, so, designate localinstall command to install from local directory.
However, dependency related errors may occur.

2
  • When I run that yum command, I get: Skipping: rpm-py-installer-0.7.0, filename does not end in .rpm. Also, with rpm-py-installer, I managed to compile the tarball, but when I went to install it, it gave the same error about the missing RPM Python bindings.
    – Erik343
    Jun 28, 2018 at 15:12
  • I inspected the code again and found that the install.py script is looking for the 'rpm-python' or 'rpm' package names in pip. And, it is not there, so it errors out...
    – Erik343
    Jun 28, 2018 at 15:57
0

I could not find 'rpm-python' package for pip anywhere, but I found a wheel for just 'rpm'. Here is the link: https://pypi.org/project/rpm/#description

Just install that, then re-install 'rpm-py-installer' and it should have no more errors!

Thanks. Erik W.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .