How Do You Install a Yum Package from a Reachable yet Unconfigured Repository on an Ad Hoc Basis?

Problem scenario
You want to install a package with a yum command.  But you receive an error about the package not being available.  You know that a reachable, yet unconfigured, repository has the package.  You know the repository's name too.

You cannot use "subscription-manager register" to configure a new repository because you do not have the proper credentials or there is a firewall blocking the Red Hat derivative Linux server.  What should you do to install a package from a different repository on a one-time basis?

Run a command such as this:
sudo yum install foobar --enablerepo=SPECIAL_REPO

# replace "foobar" with the package you want to install
# replace "SPECIAL_REPO" with the name of the repo that has it.

Leave a comment

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