1

Trying to create an RPM that uses Python 2.7 on a RHEL 6 machine. I'm using SCL to enable Python2.7 and building the RPM with it fine. However, when I try to install that RPM on a different system after enabling Python 2.7 (scl enable python27 bash then yum localinstall myrpm.rpm), I receive an error stating:

Requires: python(abi) = 2.7
Installed: python-2.6.6-64
    python(abi) = 2.6

Is there something I need to add in the spec file when building the RPM to fix this issue, or is the issue related to the environment on the machine I'm attempting to install the RPM?

0

rpmbuild adds Python requiremenst automatically from the version of python used. As such, it was adding python(abi)=2.7 to the requires list of the RPM. However, when using the python27 that scl was using provides python27-python. The issue was resolved by adding the line

AutoReqProv: no

to the spec file in the RPM. The machine that was having the rpm installed did not have to check the python(abi) requirement afterwards and instead verified that python27-python was provided.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.