Which of the following commands lists the dependencies of the RPM package file foo.rpm?
Which of the following commands lists the dependencies of the RPM package file foo.rpm?
To list the dependencies of the RPM package file foo.rpm, the correct command is 'rpm -qpR foo.rpm'. The '-q' option is used for querying an RPM package, '-p' specifies the package file, and '-R' is used to list the capabilities on which this package depends, which includes its dependencies.
answer is correct: -q = query -R = List capabilities on which this package depends (option of query parameter) -p = package file
Seems like -R on it's own does the job according to man, q does not exist. Man page on -R List capabilities on which this package depends
A is correct: https://phoenixnap.com/kb/rpm-command-in-linux
Correct Answer: A rpm -qRp [package.rpm] - show the requirements/dependencies of the indicated rpm file
https://rpm-software-management.github.io/rpm/man/rpm.8.html
The correct answer is A. rpm -qpR foo.rpm. The rpm -qpR foo.rpm command displays the requires information for the RPM package file foo.rpm. This includes the list of dependencies that the package requires in order to be installed and run properly. The other options are incorrect: B. rpm -dep foo: This command displays the provides information for the RPM package file foo.rpm. Provides information indicates what capabilities or services the package provides, not its dependencies. C. rpm -ld foo.rpm: This command displays the list of files that are installed by the RPM package file foo.rpm. It does not provide information about dependencies. D. rpm -R foo.rpm: This command lists the files that are contained within the RPM package file foo.rpm. It does not provide information about dependencies. E. rpm -pD foo: This command displays the pre-install script for the RPM package file foo.rpm. The pre-install script is executed before the package is installed, and it is not related to dependencies.
Answer: A