Перейти к содержимому

Как установить yum в ubuntu

  • автор:

Как установить Yum в Linux

Yum — это менеджер пакетов для систем Linux, который на протяжении многих лет приобрел известность как система управления пакетами по умолчанию для Red Hat Enterprise Linux и его производных дистрибутивов. С тех пор он был заменен менеджером пакетов dnf, который является ответвлением yum и был разработан, чтобы быть более быстрым, эффективным и иметь лучшую документацию. Современные дистрибутивы Linux используют yum только в качестве уровня совместимости для dnf, чтобы разместить устаревшие сценарии Bash и старые команды.

В этом руководстве мы рассмотрим пошаговые инструкции по установке yum и dnf во всех основных дистрибутивах Linux. Затем мы рассмотрим несколько команд и примеров, которые помогут вам начать установку пакетов с помощью нового менеджера пакетов.

ВНИМАНИЕ
Yum устарел (последняя версия выпущена в 2011 году) и заменен на dnf. В большинстве случаев вам потребуется установить dnf или просто придерживаться менеджера пакетов по умолчанию. В старых системах yum все еще можно использовать, но в остальном он остается актуальным сегодня только как уровень совместимости, который передает инструкции dnf.

В этом уроке вы узнаете:

    Как установить yum/dnf во всех основных дистрибутивах Linux

Как установить Yum в Linux, пошаговые инструкции

Процесс установки yum или dnf будет немного отличаться в зависимости от вашего дистрибутива Linux и его возраста. Ниже мы разделили инструкции по установке по дистрибутиву. После установки менеджера пакетов вы можете просмотреть наши примеры использования, чтобы узнать, как устанавливать пакеты.

RHEL, Fedora, CentOS, AlmaLinux, Rocky Linux

В современных версиях дистрибутивов на основе RHEL, таких как Fedora, CentOS, AlmaLinux и Rocky Linux, менеджер пакетов dnf уже установлен по умолчанию. Вы по-прежнему можете получить доступ к команде yum , но это всего лишь символическая ссылка на исполняемый файл dnf.

$ ls -l /usr/bin/yum lrwxrwxrwx. 1 root root 5 Sep 9 09:05 /usr/bin/yum -> dnf-3

CentOS 7 и более ранние дистрибутивы на базе RHEL

В RHEL 7, CentOS 7 и других устаревших дистрибутивах на основе RHEL yum уже является менеджером пакетов по умолчанию. Вы можете продолжать использовать его до тех пор, пока не обновитесь до современной версии операционной системы, после чего вам нужно будет переключиться на использование dnf.

Убунту 18.04 и Дебиан 10

Немного более старые версии Debian и Ubuntu по-прежнему могут устанавливать и использовать yum, хотя вместо этого рекомендуется выбрать dnf. Чтобы установить yum в Ubuntu 18.04, Debian 10 и более ранних версиях операционных систем:

$ sudo apt update $ sudo apt install yum

Или установить dnf:

$ sudo apt install dnf

Убунту и Дебиан

В современных версиях Ubuntu, Debian и некоторых других производных вы можете установить менеджер пакетов dnf:

$ sudo apt update $ sudo apt install dnf

При необходимости вы также можете установить уровень совместимости yum:

$ sudo apt install nextgen-yum4

Это также установит dnf в качестве зависимости (если он еще не установлен) и предоставит доступ к команде yum4 . Это просто берет старые команды yum и отправляет их прямо в dnf.

Арч Linux и Манджаро

Yum можно установить из репозитория пользователей Arch. Самый простой способ — использовать помощник AUR, например yay (если вам нужна помощь в установке yay, см. связанное руководство):

$ yay -s yum

Или просто используйте Pacman, если вы хотите вместо этого установить dnf:

$ sudo pacman -S dnf

примеры использования yum/dnf

Теперь, когда в вашей системе установлены yum и/или dnf, давайте посмотрим, как их использовать. В приведенных ниже примерах мы будем использовать команды dnf , но вы можете заменить их на команду yum или yum4 , если вы установили одну из команд yum. пакеты:

    Чтобы найти пакет в yum/dnf:

$ dnf search [package]
$ sudo dnf install [package]
$ sudo dnf update
$ sudo dnf remove [package]

Существует множество других команд dnf и yum , их можно просмотреть в руководстве:

$ man dnf and $ man yum

Заключительные мысли

В этом уроке мы увидели, как установить менеджер пакетов Yum в системе Linux. Поскольку Yum устарел и больше не разрабатывается, мы также показали, как установить dnf, который был ответвлен от yum и был значительно улучшен. В большинстве случаев вам действительно следует придерживаться менеджера пакетов по умолчанию и рассматривать только дополнительные, такие как Flatpak или Homebrew, поскольку менеджеры пакетов по умолчанию, такие как apt и pacman, уже отлично справляются с другими системами, и dnf или yum не нужны.

Install yum Ubuntu

JavaTpoint

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:

Install yum Ubuntu

  • install
    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.
  • update
    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.
  • check-update
    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.
  • upgrade
    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».
  • list
    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.
  • search
    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.
  • info
    It is used for listing the summary and description information about existing packages.
  • clean
    It is used for cleaning up several things which assemble in the cache directory of yum over time.
  • makecache
    It is used for making and downloading usable metadata for the currently activated yum repositories.
  • groupinstall
    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.
  • groupupdate
    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.
  • grouplist
    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.
  • shell
    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.
  • resolvedep
    It is used for listing the packages giving the described dependencies, at most a single package is listed/dependency.
  • localinstall
    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.
  • localupdate
    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.
  • reinstall
    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.
  • downgrade
    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.
  • repolist
    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.
  • deplist
    It generates a list for every dependency and what package offers those dependencies for the provided packages.
  • help
    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.
  • -y
    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.
  • -C
    It tells yum for running from cache entirely. It doesn’t update or download any headers unless it has to implement the requested actions.
  • —showduplicates
    It is not limit packages to their current version in the search commands, list, and info.
  • —version
    It tells the version number of yum and exits.
  • —installroot=[root]
    It describes an alternative installroot.
  • —enablerepo=repoidglob
    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.
  • —disablerepo=repoidglob
    It disables particular repositories by glob or id. The configuration option is enabled.
  • —obsoletes
    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.
  • —color=[always|auto|never]
    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.
  • —disableplugin=plugin
    It executes without one or more disabled plugins. The argument is a comma isolated wildcard list for matching against the names of the plugin.
  • —noplugins
    It executes with every plugin disabled. The configuration option is plugins.
  • —nogpgcheck
    It executes with disabled gpg signature checking. The configuration option is gpgcheck.
  • —skip-broken
    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:

Install yum Ubuntu

Step 2- Install YUM

We need to execute the install command for quickly installing the packages and their dependencies:

Install yum Ubuntu

Next Topic VNC Viewer Ubuntu

Youtube

For Videos Join Our Youtube Channel: Join Now

Feedback

  • Send your Feedback to [email protected]

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials

Splunk tutorial

SPSS tutorial

Swagger tutorial

T-SQL tutorial

Tumblr tutorial

React tutorial

Regex tutorial

Reinforcement learning tutorial

R Programming tutorial

RxJS tutorial

React Native tutorial

Python Design Patterns

Python Design Patterns

Python Pillow tutorial

Python Turtle tutorial

Keras tutorial

Preparation

Aptitude

Logical Reasoning

Verbal Ability

Company Interview Questions

Trending Technologies

Artificial Intelligence

AWS Tutorial

Selenium tutorial

Cloud Computing

Hadoop tutorial

ReactJS Tutorial

Data Science Tutorial

Angular 7 Tutorial

Blockchain Tutorial

Git Tutorial

Machine Learning Tutorial

DevOps Tutorial

B.Tech / MCA

DBMS tutorial

Data Structures tutorial

DAA tutorial

Operating System

Computer Network tutorial

Compiler Design tutorial

Computer Organization and Architecture

Discrete Mathematics Tutorial

Ethical Hacking

Computer Graphics Tutorial

Software Engineering

html tutorial

Cyber Security tutorial

Automata Tutorial

C Language tutorial

C++ tutorial

Java tutorial

.Net Framework tutorial

Python tutorial

List of Programs

Control Systems tutorial

Data Mining Tutorial

Data Warehouse Tutorial

Javatpoint Services

JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.

  • Website Designing
  • Website Development
  • Java Development
  • PHP Development
  • WordPress
  • Graphic Designing
  • Logo
  • Digital Marketing
  • On Page and Off Page SEO
  • PPC
  • Content Development
  • Corporate Training
  • Classroom and Online Training
  • Data Entry

Training For College Campus

JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week

Like/Subscribe us for latest updates or newsletter RSS Feed Subscribe to Get Email Alerts Facebook Page Twitter Page YouTube Blog Page

How To Install yum on Ubuntu 18.04

In this tutorial we learn how to install yum on Ubuntu 18.04.

What is yum

Yum (Yellow dog Updater, Modified) is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.

 * Multiple Repositories * Simple config file * Correct dependency calculation * Fast operation * rpm-consistent behavior * comps.xml group support, including multiple repository groups * Simple interface 

There are three methods to install yum on Ubuntu 18.04. We can use apt-get , apt and aptitude . In the following sections we will describe each method. You can choose one of them.

Install yum Using apt-get

Update apt database with apt-get using the following command.

After updating apt database, We can install yum using apt-get by running the following command:

Install yum Using apt

Update apt database with apt using the following command.

After updating apt database, We can install yum using apt by running the following command:

Install yum Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

After updating apt database, We can install yum using aptitude by running the following command:

How To Uninstall yum on Ubuntu 18.04

To uninstall only the yum package we can use the following command:

Uninstall yum And Its Dependencies

To uninstall yum and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

Remove yum Configurations and Data

To remove yum configuration and data from Ubuntu 18.04 we can use the following command:

Remove yum configuration, data, and all of its dependencies

We can use the following command to remove yum configurations, data and all of its dependencies, we can use the following command:

References

  • yum website
  • yum on packages.ubuntu.com

Summary

In this tutorial we learn how to install yum package on Ubuntu 18.04 using different package management tools: apt , apt-get and aptitude .

yum в ubuntu

А если подключить какие-нибудь fedoровские, и поставить rpm, их пакеты заработают?

Godspeed
( 04.02.12 21:44:05 MSK ) автор топика

репозитории прописывать пробовал?

yum это такая же программа как и все остальное, от чего бы ей не быть в репах.

Сходу 2 сценария:

1) мне нужен пакет, который есть только в репках рпм-дистра

2) я делаю сервер, зеркалирующий много разных дистров

anonymous
( 04.02.12 21:46:03 MSK )
Ответ на: комментарий от anonymous 04.02.12 21:46:03 MSK

Честно говоря, я ради интереса и общего познания делаю) Репы попробую прописать, посмотрим

Godspeed
( 04.02.12 21:48:31 MSK ) автор топика
Ответ на: комментарий от anonymous 04.02.12 21:46:03 MSK

мне нужен пакет, который есть только в репках рпм-дистра

Есть же alien и всякие преобразовальщики форматов пакетов. Если же просто пытаться установить rpm в убунту, то он потащит зависимости-rpm’ы из репозитория федоры. А при установке, например, glibc из rpm поверх уже установленной glibc из deb файлы перезапишутся, и всё наверняка сломается; если повезёт, то не всё или не сразу.

gentoo_root ★★★★★
( 04.02.12 21:56:41 MSK )
Ответ на: комментарий от gentoo_root 04.02.12 21:56:41 MSK

после этого уже и страшно. Что то в интернетах я не могу найти ни одного нормального yum.conf с прописаными репами

Godspeed
( 04.02.12 22:00:06 MSK ) автор топика
Ответ на: комментарий от gentoo_root 04.02.12 21:56:41 MSK

а почему он не может заюзать уже установленные из deb, вместо того чтобы тащить рпм?

Godspeed
( 04.02.12 22:01:46 MSK ) автор топика
Ответ на: комментарий от Godspeed 04.02.12 22:00:06 MSK

Что то в интернетах я не могу найти ни одного нормального yum.conf с прописаными репами

Не терпится поломать систему?

GotF ★★★★★
( 04.02.12 22:02:13 MSK )
Ответ на: комментарий от Godspeed 04.02.12 22:01:46 MSK

а почему он не может заюзать уже установленные из deb, вместо того чтобы тащить рпм?

yum просто о них ничего не знает, потому что не управляет файлами, установленными через dpkg. Если надо установить rpm-пакет, то лучше заюзать alien или же устанавливать зависимости вручную из deb’ов, а потом установить rpm без удовлетворения зависимостей.

gentoo_root ★★★★★
( 04.02.12 22:04:45 MSK )
Ответ на: комментарий от GotF 04.02.12 22:02:13 MSK

У меня VPS, из бэкапа восстановлю если что

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *