2

Suddenly I can't install or upgrade anything due to unmet dependencies. Below is an extract of apt upgrade. As far as I can see it's probably more or less all installed packages on the system including ubuntu-desktop, ubuntu-system, etc.

All unmet dependencies are incorrect (that I have checked) and they are actually installed and working just fine.

brian@brian-ThinkPad-X1-Carbon:~$ sudo apt upgrade
[sudo] password for brian: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
...
apport : Depends: python3 but it is not installed
          Depends: python3-gi but it is not installed
          Depends: gir1.2-glib-2.0 (>= 1.29.17) but it is not installed
          Recommends: policykit-1 but it is not installed
          Recommends: python3-systemd but it is not installed
 apport-gtk : Depends: python3 but it is not installed
              Depends: gir1.2-gtk-3.0 (>= 3.1.90) but it is not installed
              Depends: gir1.2-wnck-3.0 but it is not installed
              Depends: python3-gi but it is not installed
              Depends: procps but it is not installed
              Depends: x-terminal-emulator
              Recommends: update-notifier
              Recommends: gdb but it is not installed or
                          gdb-minimal but it is not installable
 apport-kde : Depends: python3 but it is not installed
              Depends: python3-pyqt5 but it is not installed
              Depends: procps but it is not installed
              Depends: x-terminal-emulator
              Recommends: kubuntu-notification-helper but it is not installed
              Recommends: gdb-minimal but it is not installable or
                          gdb but it is not installed
 apt : Depends: gpgv but it is not installed or
                gpgv2 but it is not installed or
                gpgv1 but it is not installed
 apt-xapian-index : Depends: python3-xapian (>= 1.4.3-1) but it is not installed
                    Depends: python3-apt (>= 0.7.93.2) but it is not installed
                    Depends: python3:any (>= 3.4~)
 aptdaemon : Depends: python3:any (>= 3.2~)
             Depends: gir1.2-glib-2.0 but it is not installed
             Depends: python3-gi but it is not installed
             Depends: policykit-1 but it is not installed
 apturl:amd64 : Depends: python3:any (>= 3.3.2-2~)
                Depends: software-properties-gtk:amd64 but it is not installable
                Depends: python3-aptdaemon:amd64 but it is not installable
                Depends: python3-aptdaemon.gtk3widgets:amd64 but it is not installable
 apturl-common:amd64 : Depends: python3:any (>= 3.3.2-2~)
                       Depends: python3-update-manager:amd64 but it is not installable
 aspell-en : Depends: aspell (>= 0.60.3-2) but it is not installed
 autoconf : Depends: perl (> 5.005) but it is not installed
            Depends: m4 (>= 1.4.13) but it is not installed
            Depends: debianutils (>= 1.8) but it is not installed
...

As recommended (by apt and other questions/answers on the forum), I have tried apt --fix-broken install, but that's even more scary.

brian@brian-ThinkPad-X1-Carbon:~$ sudo apt --fix-broken install
...
The following packages will be REMOVED:
  0ad:amd64 account-plugin-aim:amd64 account-plugin-jabber:amd64 account-plugin-salut:amd64 account-plugin-yahoo:amd64 accountsservice:amd64 accountwizard:amd64 acl:amd64 activity-log-manager:amd64 adapta-gtk-theme
  address-book-service:amd64 adium-theme-ubuntu akonadi-server:amd64 alacarte alsa-utils:amd64 anacron:amd64 apg:amd64 apparmor:amd64 apturl:amd64 apturl-common:amd64 aspell:amd64 asymptote:amd64 at-spi2-core:amd64
  atom:amd64 autopilot-desktop autopilot-desktop-legacy autopilot-qt4:amd64 autopilot-qt5:amd64 avahi-daemon:amd64 bamfdaemon:amd64 base-files:amd64 base-passwd:amd64 bash:amd64 bc:amd64 bind9-host:amd64 binutils:amd64
  biometryd-bin:amd64 blt:amd64 bluez:amd64 bluez-obexd:amd64 brasero:amd64 brasero-cdrkit:amd64 bridge-utils:amd64 bsdmainutils:amd64 bsdutils:amd64 budgie-core:amd64 budgie-desktop build-essential:amd64
...
List of all packages on system
...
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  base-files:amd64 gawk:amd64 (due to base-files:amd64) base-passwd:amd64 bash:amd64 dash:amd64 (due to bash:amd64) debianutils:amd64 (due to bash:amd64) bsdutils:amd64 coreutils:amd64 dpkg:amd64 (due to dash:amd64)
  tar:amd64 (due to dpkg:amd64) e2fsprogs:amd64 util-linux:amd64 (due to e2fsprogs:amd64) libc-bin:amd64 mount:amd64 perl-base:amd64 sed:amd64
0 upgraded, 778 newly installed, 1068 to remove and 19 not upgraded.
Need to get 322 MB of archives.
After this operation, 1.699 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

I haven't tried to continue as I have a strong feeling it won't end well.

dpkg --configure -a doesn't change anything.

Does anyone have an idea on how to get the dependencies back on track?

  • Have you been installing python or something? Please always mention what you did prior to the incident. – user692175 Aug 12 '17 at 8:15
  • I haven't done anything recently that coincides with the problem. I'm a programmer so Python2 and Python3 have been on the system for years. The only major change to the system has been a kernel issue where I had to manually downgrade the kernel, and reinstall the broken one. I'm on 4.10.0-30 now. However, I'm quite certain that I have updated and upgraded several times after that without any issues. – Brian Højen-Sørensen Aug 12 '17 at 10:01
  • Try 'sudo apt-get -f install' with no packages. – EODCraft Staff Aug 12 '17 at 10:44
  • Sudo apt-get -f install is just short for --fix-broken, so it's the same as mentioned in the post. – Brian Højen-Sørensen Aug 12 '17 at 10:48
  • you could have a look at gedit /var/log/apt/term.log to check if the problem occurred after installing or purging something that broke your dependencies. maybe some meta-package or something. – starkus Aug 13 '17 at 9:04
0

this is how i usually approach such situations:

  • list the packages that cause you issues
  • remove them with apt-get
  • finish the upgrade process / fix-missing etc.
  • install the packages one by one, resolving dependencies and conflicts one by one

Keep in mind you can remove utils you might later need, but investigating errors will usually tell you what's missing and what to install again the moment you need it.

  • Thanks for the answer, however, the issue is "solved" as I did a clean Install. But just to answer your comment, as I mentioned in the post, the list of packages with issues, was ALL packages installed on the system. So it was not possible to identify anything as the cause (and I hadn't installed anything recently when it happened), and removing packages was also broken. But I will close it, as I don't have any way of testing any suggestions anymore. – Brian Højen-Sørensen Mar 1 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.