... but not rpm. Which has left me stumped.
I built Python 3.9.16 from source, and then packaged that as an RPM (using Gradle ospackage library).
./configure
make
make altinstall DESTDIR=${PWD}/fakeroot
If I try to yum install on Centos 7.9, I get a whole load of errors relating to python(abi) and it ultimately refuses to install as there's a requirement to uninstall system Python 2.7.
But if I rpm -i the same file, it installs no problem.
Querying the RPM I built (rpm -qlvp) there are no references to /usr/bin/python.
Why's Yum finding blocking dependencies and rpm is not?
SOLVED: Error/ignorance on my part!
When creating the RPM package, the following fields must be set exactly so:
-
Name: python3
-
Release: n.el7 (where n can be incremented to force Yum to treat it as an upgrade version)
I had "python" and "1" respectively... which I suspect rpm ignores, but Yum uses to work out the dependency chain, and my values were too ambiguous.
Changing them to the values above allowed me to install via yum with no errors whatsoever (and completely unaffecting the system installation of Python).
I've tried a few didnt online guides but nothing seems to be helping me achieve what I'm looking for. I have a Linux machine for my network environment that I use for automation. I'm trying to upgrade my python 3.6.8 to some version of 3.9.x. I want to remove python 3.6.8, install 3.9, and then put 3.9 as the default for every user on the box.
Current Version of Linux 3.10.0-1160.6.1.el7.x86_64
I'm not a linux pro but I know some things.