How Do You Troubleshoot the Error “No package foobar available”?

Problem scenario
You are running "sudo yum install foobar" but it is not working.   You are trying to install a package on a RHEL server, but it is not available from the configured repositories.  You notice that many packages you normally install are not available.  What should you do?

Solution
Run this command:
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional

FFR
To find the number of packages available to you in the configured repository (or repositories), run this command:
sudo yum list available | nl | tail -n 1 | awk '{print $1}'

To learn more about yum commands, see this PDF that RedHat.com provides.

Leave a comment

Your email address will not be published. Required fields are marked *