Python RPM I built won't install

后端 未结 2 969
北海茫月
北海茫月 2021-02-01 21:14

Because I have to install multiple versions of Python on multiple Oracle Linux servers which are built via a kickstart process, I wanted to build a python rpm for our yum reposi

相关标签:
2条回答
  • 2021-02-01 21:46

    rpmbuild can get pretty smart and this is one of those cases. It probably pulled the /usr/local/bin/python from one of your script files containing something like:

    #!/usr/local/bin/python
    

    at the top. Try grep'ing for this path in the files within your bz2 file.

    0 讨论(0)
  • 2021-02-01 21:54

    You should be able to fix this issue by adding the following line to your spec file:

    AutoReq: no
    

    Here is my understanding of why this is necessary. When rpmbuild runs across .py files with a #! (shebang) it will automatically add the binary that the shebang specifies as a requirement. Not only that, if the shebang is #!/usr/bin/env python, it will add a dependency for whatever that resolves to (first python on $PATH).

    You either need to turn off the automatic requirement processing or find all shebangs that will cause problems and change them to something else.

    0 讨论(0)
提交回复
热议问题