mediumMultiple Choice
XK0-006 Practice Question: After a system update, a custom application no…
After a system update, a custom application no longer runs due to a shared library error. The library exists on the system but is in a non-standard path. Which environment variable should be checked or set to resolve this?
⚠ Common exam trap
CompTIA often tests the distinction between LD_LIBRARY_PATH (runtime library search path) and LD_RUN_PATH (link-time RPATH embedding), causing candidates to confuse the two when the question explicitly mentions a runtime error after an update.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
LD_LIBRARY_PATH
The LD_LIBRARY_PATH environment variable tells the dynamic linker (ld.so) where to search for shared libraries before the standard system paths. When a custom application fails with a shared library error after an update, and the library exists in a non-standard path, setting LD_LIBRARY_PATH to include that path resolves the issue by allowing the linker to find the library at runtime.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
LD_PRELOAD
Why it's wrong here
LD_PRELOAD forces specific libraries to load before others, overriding symbols rather than adding a search directory, so it does not resolve a missing-path lookup. It is tempting because it manipulates the dynamic linker, and it is correct when deliberately interposing replacement functions over an existing library.
- ✗
PATH
Why it's wrong here
PATH governs executable lookup, not shared-library resolution, so the loader will still fail to locate the library. It is tempting because PATH is the usual fix when a command itself is not found, which is the correct scenario when the application binary, not its dependency, sits in a non-standard directory.
- ✓
LD_LIBRARY_PATH
Why this is correct
LD_LIBRARY_PATH lists extra directories the dynamic linker searches for shared objects at runtime, so exporting it to include the library's non-standard path lets the loader resolve the dependency without moving files or editing ld.so.conf. This directly satisfies the stem's constraint: the library exists but sits outside standard search paths.
- ✗
LD_RUN_PATH
Why it's wrong here
LD_RUN_PATH is consulted only at link time to embed an rpath into a new binary; it has no effect on an already-built application at runtime. It is tempting because it does specify a non-standard library directory, and it is correct when compiling a program that must record that search path permanently.
Visual reference
About these practice questions
One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.