Dependency Error
Linux Linux
Severity: ModerateWhat Does This Error Mean?
A dependency error on Linux means the package you are trying to install requires other packages that are not installed, are the wrong version, or conflict with something already installed. You might see messages like 'Unmet dependencies' or 'The following packages have unresolvable dependency problems.' These errors can usually be resolved automatically by apt or dnf, but sometimes need manual intervention.
Affected Models
- Ubuntu
- Debian
- Fedora
- CentOS
- Arch Linux
- Linux Mint
- openSUSE
Common Causes
- The package requires a specific version of a library that is not installed
- Two packages you are trying to install conflict with each other — they need different versions of the same dependency
- A third-party repository provides a package that overrides a system package and breaks dependencies
- Your system is only partially upgraded — some packages are newer than others, causing version conflicts
- The package was built for a different version of the distribution than what you are running
How to Fix It
-
Let apt fix it automatically. Run: sudo apt --fix-broken install. apt will analyze the dependency chain and try to resolve it by installing missing packages or suggesting ones to remove.
This is always the first thing to try. apt is quite good at resolving dependency conflicts automatically.
-
Update all packages first. Run: sudo apt update && sudo apt upgrade. Dependency errors often occur because some packages are outdated. A full upgrade can resolve many dependency conflicts.
Do not run apt upgrade unless you understand that it may upgrade packages you want to keep at their current version.
-
Simulate the installation to see the conflict. Run: sudo apt install --simulate [package-name] to see what apt would do without actually doing it. This shows which packages would be removed or changed.
The --simulate flag (same as -s) is safe to run and shows you exactly what apt is planning before you commit to it.
-
Remove the conflicting package. If apt tells you a specific package is conflicting, remove it first: sudo apt remove [conflicting-package] then install what you need.
Sometimes you have to choose between two packages that conflict. Read the apt output carefully to understand which one to keep.
-
Use aptitude for complex dependency resolution. Install aptitude: sudo apt install aptitude. Then try: sudo aptitude install [package-name]. Aptitude offers multiple resolution strategies and explains the trade-offs.
Aptitude has a more sophisticated dependency solver than apt and is better at suggesting alternatives for difficult conflicts.
When to Call a Professional
Dependency errors are standard Linux territory and can always be fixed at home with a terminal. If you are not comfortable with package management, a Linux user group or IT professional can help. Serious dependency problems on a server should be handled by someone with Linux experience.
Frequently Asked Questions
What are dependencies in Linux?
Programs on Linux often rely on shared code libraries provided by other packages. Instead of every program including its own copy of common code, Linux shares libraries across programs. A dependency is simply another package that must be installed for a given package to work.
I installed a package from a website (.deb file) and now I have dependency errors. What happened?
Downloaded .deb files often have dependencies that are not in your current repositories. Run: sudo apt --fix-broken install immediately after installing a .deb file to pull in the missing dependencies. This is normal — not all software is distributed through the official Ubuntu/Debian repositories.
Why does Debian have fewer dependency problems than Ubuntu?
Debian Stable uses older, well-tested packages that have had their dependencies thoroughly checked. Ubuntu moves faster and includes newer packages, which sometimes have dependency issues during transitions. Both distributions are stable — Debian just prioritizes stability over having the newest software.