Score:0

Unable to resolve unmet dependencies

ki flag

It seems I have gotten my packages in a dependency loop, I'm not sure to be honest. Can anyone help me resolve my dependencies issues please?

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:        16.04
Codename:       xenial

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3-apt : Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
               Depends: distro-info-data but it is not installed
 python3-dbus : Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
 python3-gdbm : Depends: python3 (>= 3.9.4-0~) but 3.4.0-0ubuntu2 is installed
                Depends: libgdbm6 (>= 1.16) but it is not installed
 python3-gi : Depends: gir1.2-glib-2.0 (>= 1.48.0) but 1.40.0-1ubuntu0.2 is installed
              Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
              Depends: libgirepository-1.0-1 (>= 1.62.0-4~) but 1.40.0-1ubuntu0.2 is installed
              Depends: libgirepository-1.0-1-with-libffi8 (>= 1.62.0-4~)
              Depends: libglib2.0-0 (>= 2.56.0) but 2.40.2-0ubuntu1.1 is installed
 python3-newt : Depends: libnewt0.52 (= 0.52.21-5+b1) but 0.52.15-2ubuntu5 is installed
                Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
 python3-pycurl : Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
                  Depends: libcurl3-gnutls (>= 7.79.1) but 7.47.0-1ubuntu2.19 is installed
 python3.9 : Depends: libpython3.9-stdlib (= 3.9.9-2) but 3.9.4-1+xenial1 is installed
 python3.9-minimal : Depends: libpython3.9-minimal (= 3.9.9-2) but 3.9.4-1+xenial1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 python3-apt : Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
               Depends: distro-info-data but it is not installed
 python3-dbus : Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
 python3-gdbm : Depends: python3 (>= 3.9.4-0~) but 3.4.0-0ubuntu2 is installed
                Depends: libgdbm6 (>= 1.16) but it is not installed
 python3-gi : Depends: gir1.2-glib-2.0 (>= 1.48.0) but 1.40.0-1ubuntu0.2 is installed
              Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
              Depends: libgirepository-1.0-1 (>= 1.62.0-4~) but 1.40.0-1ubuntu0.2 is installed
              Depends: libgirepository-1.0-1-with-libffi8 (>= 1.62.0-4~)
              Depends: libglib2.0-0 (>= 2.56.0) but 2.40.2-0ubuntu1.1 is installed
 python3-newt : Depends: libnewt0.52 (= 0.52.21-5+b1) but 0.52.15-2ubuntu5 is installed
                Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
 python3-pycurl : Depends: python3 (>= 3.9~) but 3.4.0-0ubuntu2 is installed
                  Depends: libcurl3-gnutls (>= 7.79.1) but 7.47.0-1ubuntu2.19 is installed
 python3.9 : Depends: libpython3.9-stdlib (= 3.9.9-2) but 3.9.4-1+xenial1 is installed
 python3.9-minimal : Depends: libpython3.9-minimal (= 3.9.9-2) but 3.9.4-1+xenial1 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

I've been trying to tackle this issue for a couple of hours now by searching across the internet. Apologies if this is the incorrect place!

guiverc avatar
cn flag
[Ubuntu 16.04 LTS has reached the end of it's *standard* support life](https://fridge.ubuntu.com/2021/03/13/extended-security-maintenance-for-ubuntu-16-04-xenial-xerus-begins-april-30-2021/) thus is now off-topic here unless your question is specific to helping you move to a supported release of Ubuntu. Ubuntu 16.04 ESM support is available, but not on-topic here, see https://askubuntu.com/help/on-topic See also https://ubuntu.com/blog/ubuntu-16-04-lts-transitions-to-extended-security-maintenance-esm
Score:1
cn flag

Your output strongly suggests that you have wrong-version (possibly wrong-release) sources that are trying to provide incompatible packages.

This kind of damage is easy to prevent, but it can be very difficult to fix. Bluntly, this kind of damage is usually caused by the choices of the human admin. For example, the upgrade window from 16.04 ended almost two years ago.

How to prevent it:

  • Install packages from the Ubuntu repositories instead of upstream.
  • NEVER change the system-provided release of Python3.
  • If you want shiny new software, DON'T bolt it onto an LTS or older release. They are not designed for that. That just creates an un-maintainable Frankensystem.
  • Keep track of the PPA and other non-Ubuntu sources that you add to your system. When the time for a release-upgrade comes, uninstall all that software and disable those sources. After the release-upgrade is complete, audit those sources to see what you really want to re-enable.
  • Do not let your systems drift past the end of support date for their release. That makes upgrading much harder.

How to fix it - Option #1:

  1. Uninstall ALL non-Ubuntu software. Disable all PPAs and non-Ubuntu sources. Return your system to as close to stock condition as possible.
  2. Back up your data. Create a LiveUSB. Be prepared to reinstall if you encounter problems. Your output suggests the problems are likely.
  3. Run the release-upgrade. Check your output carefully for issues you created due to incompletely following Step #1.
  4. Since a Release-upgrade of 16.04 will take you to 18.04...and 18.04 loses support in a few months (not years), do another release-upgrade to 20.04. Or maybe yet another to 22.04.

How to fix it - Option #2:

  1. Back up your data and clean-install a newer release of Ubuntu.
RobWaterhouse95 avatar
ki flag
Thanks for the advice. I have gone with setting up a new VM and migrating data across. This was my very first VM which is probably why it went so bad. Thanks again!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.