Which of the following commands lists the dependencies of the RPM package file foo.rpm?
Correct Answer: A
Explanation
The command that lists the dependencies of the RPM package file foo.rpm is rpm -qpR foo.rpm. The rpm command is the low-level tool for managing RPM packages on Linux systems. The -q or --query option isused to query information about installed or uninstalled packages. The -p or --package option is used to specify a package file instead of an installed package name. The -R or --requires option is used to list the capabilities that the package requires. The capabilities are usually the names of other packages, libraries, or files that the package depends on. The rpm command is part of the 101.1 Determine and configure hardware settings topic of the LPI Linux Essentials certification program .
The other options are either invalid or do not perform the desired task. The rpm -dep foo command does not exist, as -dep is not a valid option for rpm. The rpm -ld foo.rpm command does not list the dependencies of the package file, but the files in the package. The rpm -R foo.rpm command does not list the dependencies of the package file, but the capabilities that the package provides. The rpm -pD foo command does not exist, as -pD is not a valid option for rpm. References:
* Linux Essentials - Linux Professional Institute Certification Programs
* Exam 101 Objectives - Linux Professional Institute
* rpm(8) - Linux manual page
* RPM Package Manager - Wikipedia