If you’re trying to install a software package and find that yum is giving the error “yum command not found,” a few things are happening. One possibility is the application has been uninstalled from your system.
Another option could be that the package installation was never successful in the first place or something happened during its setup process, which resulted in it being deleted from your system.
In this blog article, we will look at how to find out what’s wrong and fix it.
How to Fix “Yum Command Not Found” Error
Error “yum command not found” can be caused by several factors. This section will discuss the main causes and offer potential solutions.
Method 1: Check If Yum Is Installed In Your System
The first thing to check is to verify if you have yum installed in your system.
To check if yum is installed on Debian/Ubuntu, run the command:
$ sudo yum -bash: yum: command not found
If you get the error message above, it means yum is not in your PATH. You can also use the RPM Package Manager (RPM) to check if it knows whether or not yum is installed.
To do so, run the command:
# rpm -q yum package yum is not installed
The error message above indicates that the yum package is not installed.
Method 2: Specify the Full Path to Yum
One method is to specify the full path to yum to verify if it’s installed. You can do so by running:
# /usr/bin/yum -bash: yum: command not found
If you get the same error message, yum is not installed on your computer.
Method 3: Re-install the Yum Utility (Automatic)
To fix this problem, you will need to install the yum package on your system. To do so, execute the following command:
# sudo dnf install yum
You can use the dnf tool to install the yum package onto your system. After installation, you should no longer encounter the error “yum command not found.”
Method 4: Re-install the Yum Utility (Manual)
If yum is missing, you can re-install it by downloading the yum tool from here. Download the appropriate yum package depending on the Linux distribution you are using.
For Red Hat, you can download yum from their Red Hat Customer Portal but need an active subscription before you can download it.
Once downloaded on your computer, use the rpm utility to install yum.
# rpm -ivh /path/to/yum-X.X.X-version.rpm
“Yum command not found” error can have several possible causes: yum package not installed, incorrect path, or command used on wrong OS. Fix by installing the package or specifying the path if already installed.
If you’re still experiencing yum errors after following our solutions, you may have a bigger issue with your system. If this is the case, let me know what version of yum you are using and what error you are getting so I can help figure out what is wrong.