LX0-103 · Question #139
Which of the following commands lists the dependencies of a given dpkg package?
The correct answer is C. apt-cache depends package. apt-cache depends displays the dependency information stored in the local package cache for a specified package.
Question
Which of the following commands lists the dependencies of a given dpkg package?
Options
- Aapt-cache depends-on package
- Bapt-cache dependencies package
- Capt-cache depends package
- Dapt-cache requires package
How the community answered
(29 responses)- B7% (2)
- C90% (26)
- D3% (1)
Why each option
apt-cache depends displays the dependency information stored in the local package cache for a specified package.
'depends-on' is not a recognized subcommand of apt-cache and will return an error.
'dependencies' is not a valid apt-cache subcommand.
The apt-cache depends command queries the local package metadata cache and outputs all declared dependencies, pre-dependencies, recommends, and suggests for the named package. It shows what other packages must or should be installed to satisfy the given package's requirements.
'requires' is not a valid apt-cache subcommand.
Concept tested: Querying package dependencies with apt-cache
Source: https://manpages.debian.org/stable/apt/apt-cache.8.en.html
Topics
Community Discussion
No community discussion yet for this question.