XK0-005 · Question #1672
A Linux administrator needs to determine if prerequisites are met. One of the application requirements is to install Perl on a system. Which of the following commands would accomplish this task?
The correct answer is C. rpm -qa perl. rpm -qa queries all installed RPM packages. When combined with a package name like rpm -qa perl, it returns the installed version of Perl if it is present, or no output if it is not - this verifies whether the prerequisite is met. rpm -Uf upgrades or installs a package from a…
Question
Options
- Arpm -Uf perl
- Brpm -iv perl
- Crpm -qa perl
- Drpm -eh perl
How the community answered
(36 responses)- A6% (2)
- B3% (1)
- C89% (32)
- D3% (1)
Explanation
rpm -qa queries all installed RPM packages. When combined with a package name like rpm -qa perl, it returns the installed version of Perl if it is present, or no output if it is not - this verifies whether the prerequisite is met. rpm -Uf upgrades or installs a package from a file, not a query. rpm -iv installs a package verbosely; it does not check if it is already installed. rpm -eh is not a valid rpm option combination.
Topics
Community Discussion
No community discussion yet for this question.