Courseiva
Linux Installation and Package ManagementmediumMultiple ChoiceObjective-mapped

LPIC-1 Linux Installation and Package Management Practice Question

You are a Linux consultant hired by a university IT department. They have a custom scientific application that must be compiled from source on a cluster of identical workstations running Ubuntu 20.04. The compilation process requires a specific version of a library (libfoo 1.2) that is not available in the standard repositories, but an older version (libfoo 1.0) is available. You must provide instructions for installing libfoo 1.2 without breaking the system. The workstations have no internet access to external repositories; they can only access an internal repository. You have the source code and a .deb package for libfoo 1.2 built previously. Which approach would you recommend?

⚠ Common exam trap

Candidates often think compiling from source (Option D) is safer because it avoids package manager conflicts, but they overlook that a .deb package provides proper integration with dpkg/APT, making it the recommended method for installing software on Debian-based systems when a pre-built package is available.

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

Install the pre-built .deb package using 'dpkg -i libfoo_1.2.deb' and then fix any dependency issues with 'apt-get install -f'.

Using `dpkg -i` to install the pre-built .deb package directly places libfoo 1.2 into the system's package database, ensuring it is tracked and can be managed by dpkg/APT. Running `apt-get install -f` afterward resolves any missing dependencies by automatically installing or upgrading required packages from the internal repository, maintaining system consistency without breaking existing packages.

Answer analysis

Option-by-option breakdown

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

  • Install the pre-built .deb package using 'dpkg -i libfoo_1.2.deb' and then fix any dependency issues with 'apt-get install -f'.

    Why this is correct

    This is the standard way to install a local .deb.

  • Create a chroot environment with the required library and compile the application inside it.

    Why it's wrong here

    Creating a chroot environment isolates the compilation process, but the resulting application, once moved to the host system, would still require `libfoo 1.2` to be present and accessible on the main system for execution. This approach does not resolve the host system's runtime dependency conflict with `libfoo 1.0`. It is tempting because chroots are excellent for safely building software with specific dependencies or testing new environments without altering the host system, making them suitable if the application were to run exclusively within the chroot.

  • Force install the library over the existing one using 'dpkg --force-depends -i'.

    Why it's wrong here

    Overrides safety nets and may break other packages.

  • Download the source, configure with custom prefix and run 'make install' to place libraries in /usr/local/lib, then set LD_LIBRARY_PATH.

    Why it's wrong here

    Could conflict with system libraries, and not all software respects custom prefixes.

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

This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.