If you’re trying to install a software package and find that yum is giving the error “yum command not found”, there are a few things going on. One possibility is the application has been uninstalled from your system.
Another option could be the installation of the package 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.
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, run the command:
# 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.
Another option 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, it means yum is not installed on your computer.
Method 2: Re-install the Yum Utility
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 you do 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
If you’re still experiencing yum errors after following our solutions, then you may be having 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.