I use Centos 8.0 and want to install the latest Python 3.
When I run yum
command, it tells me
yum: command not found
but when I run rpm -q yum
, I have it yum-4.7.0-4.el8.noarch
.
Then I try to which yum
I get
/usr/bin/which: no yum in (/root/.vscode-server/bin/xxx/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)
This issue happened after I uninstalled an old Python version via
rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps
whereis python3 |xargs rm -frv
Would you mind giving me some advice on how to solve it?
dnf
orsudo dnf
work? Yum was replaced with DNF in RHEL8 and its derivatives. No idea why the yum command is not available, probably a symlink has been deprecated. " The YUM package manager is now based on the DNF technology and it provides support for modular content, increased performance, and a well-designed stable API for integration with tooling."rpm --nodeps
on your production system unless you're OK with your system malfunctioning right away or soon after. I use this command occasionally but I'm a pro user who perfectly knows what they are doing and only apply it the packages which I know for a fact will not break anything. It's best not to use RPM directly at all (though generally it must be safe).yum
is provided by the packageyum
. You'll need to runsudo dnf install yum
to geT it back. Also, you do know that CentOS 8 reached end of life on 12/31/2022. You should think about moving to a supported OS.