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?

Andy Arismendi
  • 1,168
  • 4
  • 16
  • 27

1 Answers1

1

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.

Andy Arismendi
  • 1,168
  • 4
  • 16
  • 27