A program fails to start with an error about a missing shared object. Type the command that prints the shared libraries the binary /usr/bin/ssh depends on, and shows which file each one currently resolves to.
LPIC-1 Exam 101-500, objective 102. Linux installation and package management easy
Draft — not checked yet. This question was written from the published exam objectives and cites the clause it comes from, but nobody has yet read it against that clause and signed for it.
It is kept out of search results and out of mock exams until they have. Read the source below before you take the answer as settled.
Answer
Type the answer.
Accepted answers
ldd /usr/bin/ssh/usr/bin/ldd /usr/bin/ssh
Case sensitive — Linux is, and grading LS as ls would teach a falsehood.
Why
ldd lists a binary's dynamic dependencies and the path each soname resolves to right now, printing 'not found' for the ones the dynamic linker cannot locate — which is exactly how you identify a missing library. Do not confuse it with ldconfig, which rebuilds the linker's cache. Note that ldd works by asking the dynamic linker to resolve the object, so running it on an untrusted binary is not a safe inspection technique.
Where this comes from
- Cited
- LPI exam objective 102.3
- What it says
- Identify the shared libraries a given program depends on.
Practise this
Reading one question is not practice. The trainer will draw a set from objective 102 and space the ones you get wrong.