installationubuntu-16.04apt-getapt

apt-get is broken and can't install anything


My apt-get is totally broken and can't install anything. The output of 'apt-get install -f" is as follows:

# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 gnome-icon-theme : Depends: gtk-update-icon-cache
 python3-cairo : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
 python3-gdbm : Depends: python3 (>= 3.6) but 3.4.3-1 is installed
 python3-reportlab-accel : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
 rhythmbox : Depends: rhythmbox-data (= 3.1-1ubuntu3) but 3.4.1-2ubuntu5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

The output of 'sudo apt install python3' is in the picture:https://imgur.com/a/IbGK0

I have Googled any possible questions and tried any possible solutions but NO ONE worked for it.


Solution

  • Go to /var/log/dist-upgrade/apt.log and identify the packages that are broken. "apt-get remove" the packages, do release upgrade and then you should be able to reinstall them.

    You can find more information here: https://askubuntu.com/questions/124845/eerror-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-hel