Courseiva
GNU and Unix CommandshardMultiple ChoiceObjective-mapped

LPIC-1 GNU and Unix Commands Practice Question

A company runs a legacy application on a Linux server. The application fails to start after a reboot, claiming a 'cannot open shared object file' error. The system administrator checks the library path and finds that the required library is present in /usr/local/lib but the application cannot find it. The administrator has verified that the library file exists and is readable. Which of the following is the most likely cause and solution?

⚠ Common exam trap

A common mix-up: candidates assume a library found in a standard-looking path like /usr/local/lib is automatically searched, but the dynamic linker only uses paths explicitly listed in /etc/ld.so.conf (or its included files) after running ldconfig.

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

The library path is not in /etc/ld.so.conf; run ldconfig after adding it.

The dynamic linker/loader (ld.so) uses the cache file /etc/ld.so.cache to resolve shared library dependencies at runtime. Although the library exists in /usr/local/lib, that path is not listed in /etc/ld.so.conf (or a file included by it), so the linker never scans it. Running ldconfig rebuilds the cache and makes the library discoverable, which resolves the 'cannot open shared object file' error.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The library has insufficient execute permissions; add execute bit.

    Why it's wrong here

    Libraries require read permission, not execute, to be used by the dynamic linker.

  • The application is setuid root and the library path is ignored; use $LD_LIBRARY_PATH.

    Why it's wrong here

    Setuid binaries ignore LD_LIBRARY_PATH for security reasons, so that would not work.

  • The library path is not in /etc/ld.so.conf; run ldconfig after adding it.

    Why this is correct

    ldconfig updates the linker cache to include paths from /etc/ld.so.conf.

  • The library is compiled for a different architecture; recompile the library.

    Why it's wrong here

    While possible, the error typically mentions architecture mismatch; the given error is about not finding the shared object.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

One of 527 original LPIC-1 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.