XK0-005 · Question #1357
XK0-005 Question #1357: Real Exam Question with Answer & Explanation
The correct answer is A: cd <source>; sudo ./configure $$ make $$ make install. To compile and install an application from source as an unprivileged user, the configure and make steps can run without root, but the make install step requires elevated privileges.
Question
An administrator is logged on as an unprivileged user and needs to compile and installed an application from source. Which of the following BEST represents how to complete this task?
Options
- Acd <source>; sudo ./configure $$ make $$ make install
- Bcd <source>; ./configure $$ sudo make $$ make install
- Ccd <source>; ./configure $$ make $$ make install
- Dcd <source>; ./configure $$ make $$ make install
Explanation
To compile and install an application from source as an unprivileged user, the configure and make steps can run without root, but the make install step requires elevated privileges.
Common mistakes.
- B. Applying
sudotomakeis generally unnecessary as compilation usually occurs in user-writable directories, whilemake installwithoutsudowould fail due to permission errors. - C. Running all commands without
sudowould causemake installto fail because an unprivileged user lacks the permissions to write to system directories. - D. This option is identical to C, and also lacks the necessary
sudofor themake installstep.
Concept tested. Compiling and installing software from source with permissions
Reference. https://www.gnu.org/software/automake/manual/html_node/Installation.html
Topics
Community Discussion
No community discussion yet for this question.