XK0-004 · Question #178
A Linux administrator attempts to install the package newprogram.x86_64.rpm using a package manager. The administrator receives a warning indicating the command that was run was using a deprecated pac
The correct answer is A. # dnf install newprogram.x86_64.rpm. The .rpm extension identifies a Red Hat-based package, and dnf is the modern, non-deprecated replacement for yum on RHEL 8+, Fedora, and related distributions.
Question
A Linux administrator attempts to install the package newprogram.x86_64.rpm using a package manager. The administrator receives a warning indicating the command that was run was using a deprecated package manager. Which of the following commands should the administrator use to avoid the warning and install the newprogram.x86_64.rpm program?
Options
- A
dnf install newprogram.x86_64.rpm
- B
rpm -e newprogram.x86_64.rpm
- C
dpkg -i newprogram.x86_64.rpm
- D
apt-get install newprogram.x86_64.rpm
How the community answered
(51 responses)- A94% (48)
- C4% (2)
- D2% (1)
Why each option
The .rpm extension identifies a Red Hat-based package, and dnf is the modern, non-deprecated replacement for yum on RHEL 8+, Fedora, and related distributions.
dnf (Dandified YUM) replaced yum as the default package manager starting with RHEL 8 and Fedora 22, eliminating the deprecation warning; it accepts local .rpm files directly via the install subcommand and automatically resolves dependencies.
rpm -e is the erase (uninstall) flag, not the install flag; even with the correct -i flag, rpm does not resolve dependencies and is not the replacement for the deprecated yum/dnf warning context.
dpkg is the low-level package manager for Debian and Ubuntu systems and cannot parse or install .rpm packages, which are exclusive to Red Hat-based distributions.
apt-get is the package manager for Debian/Ubuntu distributions and cannot process .rpm packages; it is not applicable to a Red Hat-based environment.
Concept tested: Installing RPM packages using the dnf package manager
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_software_with_the_dnf_tool/index
Topics
Community Discussion
No community discussion yet for this question.