For marketers
who love technology
Home » , » How to solve broken package problems with apt-get ?

How to solve broken package problems with apt-get ?

A screenshot of the apt-get program of APT ins...
A screenshot of the apt-get program of APT installing MediaWiki on Ubuntu 10.10. (Photo credit: Wikipedia)
If you run a Debian and like to mess with the system, by, for instance, using dpkg, apt-get, and aptitude to manage your packages, there are big chances you will end up in a situations where apt refuses to install most packages due to broken dependencies. This post will help you solve the problem


The first thing to do is to run a dist-upgrade command. It most cases it will solve your issues.
sudo apt-get update
sudo apt-get dist-upgrade
If dist-upgrade did not solve your problems, it means that you have managed to put a real mess in your system. We are going to list the broken packages to understand better the problems.
sudo aptitude install deborphan apt-file
sudo apt-file update
deborphan |more
If you see broken packages, it may be time to remove them... If you want to do so, run the following command as many time as required until you have no broken package anymore.
deborphan | xargs sudo dpkg --purge
Finally, let's update and install the required packages to get back to a normal system.
sudo aptitude

In aptitude, press "u" to update the repository package lists. If any error occurs, tidy your /etc/apt/source.list and /etc/apt/sources.list.d. When this is done, press "g" to update your system. And that's it, package inconsistencies should be solved.
SHARE

About Gilles

0 comments :

Post a Comment