Install yum Ubuntu
Introduction to Yum
YUM (Yellowdog Updater Modified) is an open-source and free command-line package management utility for systems executing the Linux OS with the help of the RPM package manager. Many other tools offer GUI to YUM functionality because YUM contains a command-line interface.
YUM permits automatic updates and package dependency management over RPM-based distros. YUM implements software repositories (set of packages) that can be locally used or on a network connection similar to the Advanced Package Tool from Debian.
- YUM relies on RPM under the hood which is a packaging standard for software digital distribution which automatically applies digital signatures and hashes for verifying the integrity and authorship of said software, unlike a few app stores which provide the same function neither RPM nor YUM offer built-in support for essential restrictions on package copying by end-users.
- YUM is worked as libraries with the Python programming language using a small collection of programs that offer a command-line interface.
- Graphical user interface-based wrappers like YUM Extender are also available and have been accepted for Fedora Linux until the 22 version.
- YUM rewrite named DNF substituted YUM as a default package manager in the 22 version of Fedora. It is due to Fedora was going to transfer to Python 3 which specified that YUM would not survive this modification.
- DNF can execute using either Python 3 or 2.
- Also, DNF was established for improving YUM in many ways - better resolution and improved performance of dependency conflicts, and simpler integration with other application software.
History of YUM
During 1999-2001, Yellowdog Updater (or YUP) (the real package manager) was integrated by Dan Burcaw, Troy Bengegerdes, Stephen Edie, and Bryan Stillwell at Terra Soft Solutions as an engine of the back-end for the Yellow Dog Linux graphical installer.
Primarily, YUM evolved for updating and managing Red Hat Linux systems utilized at the Duke University Department of Physics by Michael Stenner and Seth Vidal as a complete YUM rewrite. Vidal continued to devote to YUM until he expired in North Carolina, Durham bicycle accident on July 8, 2013.
Yum focused to specify both the anticipated deficiencies in the previous APT-RPM and limitations to the tool, i.e., Red Hat up2date package management. YUM outmoded up2date in the 5 and later versions of Red Hat Enterprise Linux. A few authors introduce YUM as the Yellowdog Update Manager or recommend that "Your Update Manager" will be more appropriate.
Common knowledge of YUM is included as a need for Linux system administrators modified and distributed without royalty when other license terms are honored. Yum has been ported to several other OSes including ArcaOS, IBM, and AIX while it was originally made for Linux.
Operations of YUM
YUM can implement operations like:
- Listing installed packages
- Listing existed packages
- Updating available installed packages
- Removing packages
- Installing packages
Extensions of YUM
In Python, YUM 2.x versions provide an extra interface for several programming extensions that permits the YUM behavior to be altered. Several plug-ins are by default installed. yum-utils is a commonly installed package and includes commands which apply the YUM API and several plugins.
Graphical user interfaces, called "front-end", permit easier YUM usage. YUM Extender and PackageKit are two examples. YUM Extender was depreciated for a while Fedora relocated to DNF, it was rewritten in Gtk 3 and Python 3 and has been in development progress. This new YUM Extender is present for the 34 or newer versions of Fedora.
Metadata of YUM
Package information (as opposed to packages themselves) is called metadata. This metadata is combined with details in all packages for determining dependencies between the packages. The hope is to ignore a situation called dependency hell. An isolated tool, i.e., createrepo fixes up the software repositories of YUM, producing the essential metadata in the classical XML format. The mrepo tool (formerly called Yam) can aid in the maintenance and creation of repositories.
The XML repository of YUM, created with input from several other developers, became a standard for RPM-based repositories. SUSE Linux 10.1 supports repositories of YUM in YaST and the repositories, i.e., Open Build Service apply the metadata of YUM XML repository format.
Automatically, YUM integrates the remote metadata to a local client along with other tools electing to integrate only when claimed by the user. Automatic synchronization defines that YUM can't fail because the user fails to execute a command at an appropriate interval.
Command Tags of YUM
Some important command tags and their description are as follows:
It is used for installing the latest package version of the set of packages while assuring that every dependency is satisfied. The packages are supposed to be a small glob and then matches are installed if they are not matching with the given name of the package.
If the name begins with the @ character, the other names are used so that they can be passed to the command, i.e., groupinstall. Install implements like localinstall if the name is the file. If the name does not match any package, the package "provides" are searched.
Note: Wildcards will match more than one package for filelists.
The update tag will update all currently installed packages if execute without packages. If multiple packages or package globs are specified, YUM will update the specified packages only. YUM will assure that every dependency is satisfied while updating any package. If the globs or packages described match packages that aren't currently installed, the update tag will not install them.
Update works on filelists, provides, files, and groups similar to the command, i.e., "install". If the flag, i.e., --obsoletes is available or the primary obsolete configure option is true, yum will add package obsoletes in the calculations. It makes it better for distribution version modifications.
It could be implemented so we could know if our machine had updates that required to be used without interactively executing it. It returns a 100 exit value if there are packages present for an update. It also returns the pkgs list to be updated in the list format. It returns the 0 value if no package is present for an update. It returns the 1 value if an error appeared. Also, executing in verbose mode displays obsoletes.
It is the same as the command, i.e., update with the flat set, i.e., --obsoletes.
- erase or remove
It is used for removing the specified packages through the system and removing the packages which rely on the package being deleted. The remove tag works on filelists, provides, files, and groups similar to the command, i.e., "install".
It is used for listing information about existing packages.
- whatprovides or provides
It is used for finding out which packages gives some files or features. Just use a file-glob-syntax wildcard or a particular name for listing the packages installed or available that give that file or feature.
It is used for finding packages that are the same as a string in the package, summary, and description name fields of rpm. It is useful to find a package we don't know by the name but know by a few words corresponding to it.
It is used for listing the summary and description information about existing packages.
It is used for cleaning up several things which assemble in the cache directory of yum over time.
It is used for making and downloading usable metadata for the currently activated yum repositories.
It is used for installing every individual package within a group of the described types. The configuration option, i.e., group-package-types describes which type would be installed.
For groupinstall, it is only an alias that will implement the right thing because the "yum update X" and "yum install X" commands do a similar thing. Where X is installed already.
It is used for listing the existing groups from every repository of yum. Groups are considered as "installed" if every necessary package is installed or if a group does not have any necessary package, then it is installed if any of the default or optional packages are installed. Also, the optional argument, i.e., "hidden" will list groups considered as not being "user-visible". The groupid is displayed if we pass the -v option for enabling the verbose mode.
It is used for entering the "yum shell" if the name of the file is described the contents of the file are run in the yum shell mode.
It is used for listing the packages giving the described dependencies, at most a single package is listed/dependency.
It is used for installing a group of local rpm files. The enabled repositories would be used for resolving dependencies if required.
Note: The install command will implement a local install if provided a filename.
It is used for updating the system by describing local rpm files. The described rpm files of which a previous version is installed will be only installed, the other described packages will be avoided. The enabled repositories would be used for resolving dependencies if required.
Note: The update command will implement a local install if provided a filename.
It will reinstall the versioned package identically. Like kernels, it doesn't operate for "installonly" packages. The reinstall tag works on filelists, provides, files, and groups similar to the "install" command.
It will attempt and downgrade the package from the release currently installed to the older highest version (or the described version). Like kernels, it doesn't operate for "installonly" packages. The downgrade tag works on filelists, provides, files, and groups similar to the "install" command.
It generates the configured repository list. The default is for listing every enabled repository. If we pass the -v option, more details are listed for verbose mode.
It generates a list for every dependency and what package offers those dependencies for the provided packages.
It generates help either for every command or if given the name of a command, the help for that specific command will occur.
General Options of YUM
Most options of the command line can be fixed with the help of the configuration file. The descriptions represent the essential configuration option to fix.
- --help, -h
It shows a help message and quit.
- -c [config file]
It specifies the location of the conflict file. It can take local files, ftp urls, and http paths.
It supposes that the answer to a question that will be promoted is yes. The configuration option is assumeyes.
- --quiet, -q
It executes without output.
Important: We likely wish to apply the -y option as well.
- -d [number]
It sets the level of debugging to a number. It turns down or up the amount of the things that are printed. The practical range of it is 0-10 and the configuration option is debuglevel.
- --verbose, -v
It executes with several debugging outputs.
- -e [number]
It sets the level of an error to a number. The practical range of it is 0-10. 0 defiles that it prints critical errors only about which we must be told. 1 prints every error, even those that aren't important overly. 1+ prints more errors. The configuration option is errorlevel.
- -R [time in minutes]
It sets the max amount of time in which yum will wait before implementing a command.
It tells yum for running from cache entirely. It doesn't update or download any headers unless it has to implement the requested actions.
It is not limit packages to their current version in the search commands, list, and info.
It tells the version number of yum and exits.
It describes an alternative installroot.
It enables particular repositories by glob or id that has been disabled within the configuration file with the help of the enabled=0 option. The configuration option is enabled.
It disables particular repositories by glob or id. The configuration option is enabled.
It has affect for the update only. It enables the obsoletes processing logic of yum. The configuration option is obsolete.
- --exclude, -x=package
It excludes a particular package by glob or name from updates on each repository. The configuration option is exclude.
It automatically shows colorized output relying on the output terminal, never or always. The configuration option is color.
Note: A few commands will work a little extra if color is enabled.
It executes without one or more disabled plugins. The argument is a comma isolated wildcard list for matching against the names of the plugin.
It executes with every plugin disabled. The configuration option is plugins.
It executes with disabled gpg signature checking. The configuration option is gpgcheck.
It resolves depsolve issues by deleting packages that are leading to issues from the transactions. The configuration option is skip_broken.
- --tolerant, -t
Currently, this option does nothing.
Installing YUM in Ubuntu
Step 1- Update the system
We need to execute the update command for getting the latest package information and updating package repositories:
Step 2- Install YUM
We need to execute the install command for quickly installing the packages and their dependencies: