Courseiva

LPIC-1 Linux Installation and Package Management Practice Question

A junior administrator needs to install the package 'nginx' on an Ubuntu 22.04 server. They download the nginx_1.18.0-6ubuntu14.4_amd64.deb file from a vendor website and run the command 'dpkg -i nginx_1.18.0-6ubuntu14.4_amd64.deb'. The installation fails with an error stating that the package depends on 'libnginx-mod-http-image-filter'. Which command should the administrator run next to resolve the missing dependency?

⚠ Common exam trap

The trap here is assuming that dpkg can resolve dependencies on its own or that forcing installation will solve the problem, when in fact dpkg only reports dependency errors and requires a higher-level tool like APT to fix them.

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

✓

apt-get install -f

When dpkg fails to install a .deb file because of unmet dependencies, the package remains unconfigured and the system package database becomes inconsistent. The recommended fix is to run 'apt-get install -f', which instructs APT to resolve broken dependencies by downloading and installing required packages from the repositories. This restores system consistency and completes the installation.

Answer analysis

Option-by-option breakdown

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

  • ✓

    apt-get install -f

    Why this is correct

    Running 'apt-get install -f' (or 'apt --fix-broken install') instructs APT to analyze the package database, identify unmet dependencies like the missing libnginx-mod-http-image-filter, and automatically download and install them from configured repositories. This is the standard method to repair a system left in an inconsistent state by a dpkg installation that failed due to missing dependencies.

  • ✗

    dpkg -i --force-depends nginx_1.18.0-6ubuntu14.4_amd64.deb

    Why it's wrong here

    Using --force-depends with dpkg forces installation despite unmet dependencies, leaving the system in a broken state where nginx may not function correctly because required libraries are absent. This option ignores the dependency issue rather than resolving it and is not a recommended solution for missing dependencies in a production environment.

  • ✗

    apt-get update

    Why it's wrong here

    apt-get update refreshes the local package index from repositories but does not install or resolve dependencies. While it is good practice before installing software, it will not fix the broken package state left by the failed dpkg command. The administrator must explicitly ask APT to fix broken dependencies and install missing packages.

  • ✗

    dpkg --configure -a

    Why it's wrong here

    dpkg --configure -a attempts to configure any unpacked but unconfigured packages. It does not resolve missing dependencies because it only runs configuration scripts for packages already unpacked. Since the nginx package was not unpacked due to the dependency error, this command will not install libnginx-mod-http-image-filter or any other required packages.

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

Courseiva writes every LPIC-1 question from scratch — 402 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official LPI exam blueprint

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.