2

Both of these commands work and give you a working version of the yum command:

sudo apt install yum-utils
sudo apt install yum

That means that someone created them and put them there on purpose, for an actual reason. Why would someone want to run yum on Ubuntu?

N0rbert
  • 103,263

3 Answers3

2

The whole life of this package is presented on https://tracker.debian.org/pkg/yum .

It is removed from Debian unstable because of Python 2 deprecation.

See https://tracker.debian.org/news/1101794/removed-343-3-from-unstable/ and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951299 .

N0rbert
  • 103,263
2

They were useful if you wanted to install Fedora in a chroot on top of Ubuntu. See this script I wrote which does exactly that in order to install Cygwin inside the chroot. (Cygwin packages are available for Fedora but not for Ubuntu.) That script works on Ubuntu 19.10, from 20.04 onwards it doesn't work any more due to the removal of this yum package.

(As to why you'd want to install Cygwin on Ubuntu – the Cygwin runtime only works on Windows; it can run under Wine but with lots of issues/breakages due to Wine's imperfect emulation of Windows. But the Cygwin compilers run fine on Linux–they can be compiled as native Linux executables but generating Windows executables as compilation output. This is basically the same as the more common case of running MinGW cross compilers on Linux, except that the MinGW compilers produce fully native Windows executables that don't have access to the POSIX API, whereas the Cygwin compilers produce Windows executables that rely on cygwin1.dll and can use the POSIX API provided by that DLL. So if you have a C/C++/etc program which you want to compile to run under Cygwin, you can use a Linux build host to do the compilation, and then you can copy it to a Windows machine for execution. Some people, for various reasons, can find doing all their building on Linux easier than having to send part of the build to Windows – e.g. if you have a Linux-only CI environment, or a CI environment with lots of Linux build agents but a limited supply of Windows ones.)

2

These packages contain not only yum itself, but also tools for managing a package repository. This is useful if you want to host or mirror a package repository for RPM-based distributions on an Ubuntu host. And, expanding Simon's answer, besides bootstrapping an RPM-based distribution on a chroot-environment or container, one might want to repair an image/disk of an RPM-based distro.

sloh
  • 21