YUM - Install a package

The yum install command is used to install a package from one of the repositories you have installed. The repositories you have installed will be listed at the beginning of the output. It is very common to install the EPEL (Extra Packages for Enterprise Linux) repository.

~]$ yum list | head
 * base: centos.mirrors.tds.net
 * centos-sclo-rh: mirror.den01.meanservers.net
 * centos-sclo-sclo: mirror.den01.meanservers.net
 * epel: mirror.team-cymru.com
 * extras: centos.mirrors.tds.net
 * updates: mirror.genesishosting.com


Let's say you try to install a package that is not found in any of the repositories you have installed.

yum install foo


Something like this should be returned.

base                                                                                                                                                                  | 3.6 kB  00:00:00
centos-sclo-rh                                                                                                                                                        | 3.0 kB  00:00:00
centos-sclo-sclo                                                                                                                                                      | 3.0 kB  00:00:00
extras                                                                                                                                                                | 2.9 kB  00:00:00
updates                                                                                                                                                               | 2.9 kB  00:00:00
No package foo available.
Error: Nothing to do


On the other hand, let's try to install a package that is found in one of the repositories you have installed.

yum install wget


Something like this should be returned. Notice in this example the the wget package is found in the "base" repository.

Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                            Arch                                                 Version                                                        Repository                                          Size
 wget                                               x86_64                                               1.14-18.el7_6.1                                                base                                               547 k

Transaction Summary
Install  1 Package

Total download size: 547 k
Installed size: 2.0 M
Is this ok [y/d/N]: 


Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 78343 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |