During routine maintenance of a lab server running a Debian-based distribution, you manually download a custom package named custom-agent_1.0_amd64.deb and attempt to install it with:
sudo dpkg -i custom-agent_1.0_amd64.deb
The installation fails and reports:
dpkg: error processing package custom-agent (--install):
dependency problems - leaving unconfigured
custom-agent depends on libfoo2 (>= 2.4) but it is not installed
You need the quickest command-line method to fetch the missing libraries and complete the installation without removing the partially installed package. Which command should you run next?
The -f (or --fix-broken) option of apt-get tells APT to "attempt to correct a system with broken dependencies". When used with the install sub-command and no package names, it will examine partially installed packages, automatically download and install any missing dependencies from the configured repositories, and configure the affected packages. This resolves the error left by the failed dpkg -i operation.
apt-get -f install is therefore the appropriate follow-up.
dpkg --force-depends --install would ignore the dependency checks, leaving the package unusable.
apt-cache policy only displays repository information and does not resolve dependencies.
apt-get autoremove removes orphaned packages; it will not install the required libraries.
Thus, running sudo apt-get -f install (or the equivalent apt --fix-broken install) is the correct corrective action.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the -f option do in the command 'sudo apt-get -f install'?
Open an interactive chat with Bash
How does dpkg differ from apt when installing packages?
Open an interactive chat with Bash
What is the significance of the error message 'dependency problems - leaving unconfigured'?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Troubleshooting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access