can't resolve conflicts with apt

Asked by cerr on 2019-09-26

Hi,

i've got an open thread on ubuntuforums.org: https://ubuntuforums.org/showthread.php?t=2427078&page=3&p=13891370#post13891370 about this very topic and was sent here to double check with you, too. I basically have a messed up xenial 16.04 installation that I would like to bring up-to-date. I've reported the following iregularrities in apt:

[QUOTE=rsteinmetz70112;13891049]Before we do anything dangerour lets find out a little more about the state of your system. Run the following commands and post the results.
[CODE]$ ls /usr/lib | grep python
$ ls -ld /usr/bin/python
$ ls -ld /usr/bin/python3
$ which python
$ python --version[/CODE]

To remove a package:
[CODE]sudo apt remove <package name>[/CODE]
I'm not sure if that will work on partially installed packages if not try.
[CODE]sudo apt purge <package name>[/CODE]
or combine the two
[CODE]sudo apt remove --purge <package name>[/CODE]
I'd be careful and remove them one at a time.
The command should include the version number the standard Ubuntu would be something like apt-python3.7

Python-minimal is a pretty important package breaking it could break all sorts of stuff.

This seems to me likely to be the most critical package holding up the works since the 3.7 version is already installed.
[/QOTE]
[code]
$ ls /usr/lib |grep python
python2.7
python3
python3.5
python3.7
python3.8
$ ls -ld /usr/bin/python
lrwxrwxrwx 1 root root 9 Nov 23 2017 /usr/bin/python -> python2.7
$ ls -ld /usr/bin/python3
lrwxrwxrwx 1 root root 9 Mar 26 03:25 /usr/bin/python3 -> python3.7
$ which python
/usr/bin/python
$ python --version
Python 2.7.12
[/code]
Let's see, just making sure that I understand. the Python3.8 library seems to be a bit out of place, why does Python3 not link to the 3.8, should it?

Now, I have not gone ahead and removed or purged anything else yet. I've also got the following:
[code]
$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 9 Nov 23 2017 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 Nov 23 2017 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root 15 Jul 25 09:29 /usr/bin/python2.5 -> /usr/bin/python
-rwxr-xr-x 1 root root 3492656 Aug 22 12:43 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Aug 22 12:43 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root 9 Mar 26 03:25 /usr/bin/python3 -> python3.7
-rwxr-xr-x 2 root root 4460272 Aug 20 13:08 /usr/bin/python3.5
lrwxrwxrwx 1 root root 33 Aug 20 13:08 /usr/bin/python3.5-config -> x86_64-linux-gnu-python3.5-config
-rwxr-xr-x 2 root root 4460272 Aug 20 13:08 /usr/bin/python3.5m
lrwxrwxrwx 1 root root 34 Aug 20 13:08 /usr/bin/python3.5m-config -> x86_64-linux-gnu-python3.5m-config
-rwxr-xr-x 2 root root 4877888 Apr 2 22:39 /usr/bin/python3.7
lrwxrwxrwx 1 root root 33 Apr 2 22:39 /usr/bin/python3.7-config -> x86_64-linux-gnu-python3.7-config
-rwxr-xr-x 2 root root 4877888 Apr 2 22:39 /usr/bin/python3.7m
lrwxrwxrwx 1 root root 34 Apr 2 22:39 /usr/bin/python3.7m-config -> x86_64-linux-gnu-python3.7m-config
lrwxrwxrwx 1 root root 16 Mar 26 03:25 /usr/bin/python3-config -> python3.7-config
lrwxrwxrwx 1 root root 10 Mar 26 03:25 /usr/bin/python3m -> python3.7m
lrwxrwxrwx 1 root root 17 Mar 26 03:25 /usr/bin/python3m-config -> python3.7m-config
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python-config -> python2.7-config
[/code]

[QUOTE=rsteinmetz70112;13891049]
Before doing anything irreversible you might want to try:
[CODE]sudo apt install python3-minimal libpython3-stdlib --reinstall --simulate[/CODE]
This should run the command without actually doing anything but should also show you what the command would do without the --simulate
to make sure it will try to download and install 3.5.1-3 over the existing 3.7 packages.[/QUOTE] Cool, I didn't even know about the [b]--simulate[/b] option. Great, Thanks!
[QUOTE=rsteinmetz70112;13891049]
In fact you might want to download the debs for python3-minimal or get a Ubuntu 16.04 iso and add it to your sources before you attempt to remove anything so if apt breaks you will still have them available[/QUOTE]

Yes, I will download a 16.04 iso and mount it!

and then, the next reply says:
At least part of the problem is that python3 is linked to python3.7.

In 16.04 the default is to link to python3.5. Simply changing that link may fix it. Since Python is so important for many things you need to be sure before you do anything or at least be prepared for the concequences. You can really mess up your system.

If a reinstall of python3-minimal from the Ubuntu repositories fixes the python3 link you will probably be fine.

You could try renaming the python3 link (python3.7?) and create a new link python3 to python 3.5 and reboot.
If that doesn't work you could boot into a recovery shell or an iso and fix it. This option offers the possibility of returning the system to its current state.

You could also try removing python3.7

The real question is are you feeling lucky?

The problem is, I can't install python3-minimal:

$ sudo apt install python3-minimal --reinstall --simulate
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of python3-minimal is not possible, since it cannot be downloaded.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 apt-xapian-index : Depends: python3-xapian (>= 1.4.3-1)
 cmake : Depends: cmake-data (= 3.5.1-1ubuntu3) but 3.13.4-1 is to be installed
 libcairo2-dev:i386 : Depends: libfontconfig1-dev:i386 (>= 2.2.95) but it is not going to be installed
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.60.0-1) but 2.48.2-0ubuntu4.4 is to be installed
 libglib2.0-dev:i386 : Depends: libglib2.0-bin:i386 (= 2.48.2-0ubuntu4.4)
 python3 : PreDepends: python3-minimal (= 3.5.1-3) but 3.7.3-1 is to be installed
           Depends: libpython3-stdlib (= 3.5.1-3) but 3.7.3-1 is to be installed
 python3-apt : Depends: python3 (>= 3.7~) but 3.5.1-3 is to be installed
 python3-brlapi : Depends: python3 (>= 3.7~) but 3.5.1-3 is to be installed
 python3-dev : Depends: python3 (= 3.7.3-1) but 3.5.1-3 is to be installed
 python3-distutils : Depends: python3 (>= 3.7.1-1~) but 3.5.1-3 is to be installed
 python3-lib2to3 : Depends: python3 (>= 3.7.1-1~) but 3.5.1-3 is to be installed
 python3-libapparmor : Depends: python3 (>= 3.7~) but 3.5.1-3 is to be installed
 python3-lxml : Depends: python3 (>= 3.7~) but 3.5.1-3 is to be installed
 python3-pil : Depends: python3 (>= 3.7~) but 3.5.1-3 is to be installed
               Recommends: python3-olefile but it is not installable
 testdrive-common : Depends: qemu-kvm or
                             kvm (>= 1:84+dfsg-0ubuntu12.4) or
                             virtualbox (>= 4.0) but it is not going to be installed
                    Recommends: kvm-pxe but it is not installable
 virtualbox-ext-pack : Depends: virtualbox (< 5.1.38-dfsg-z) but it is not going to be installed or
                                virtualbox-5.1 but it is not installable
                       Depends: virtualbox (>= 5.1.38-dfsg-0~) but it is not going to be installed or
                                virtualbox-5.1 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

What would you recommend I do?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2019-10-08
Last query:
2019-10-08
Last reply:
2019-10-07
Manfred Hampl (m-hampl) said : #1

For diagnostic purposes please provide the output of the following commands (even if that information partly is already available on ubuntuforums):

uname -a
lsb_release -crid
grep '^deb ' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
sudo dpkg --audit
apt-cache policy python3 python3-minimal libglib2.0-bin libglib2.0-0

My first conclusion: There are packages from other sources or for higher releases on your system.

cerr (ron-eggler) said : #2

okay,
Here's the requested data:

ron@jpax-build07:~/Downloads$ uname -a
Linux jpax-build07 4.15.0-54-generic #58~16.04.1-Ubuntu SMP Mon Jun 24 13:21:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ron@jpax-build07:~/Downloads$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
ron@jpax-build07:~/Downloads$ grep '^deb ' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://ca.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
grep: /etc/apt/sources.list.d/*.list: No such file or directory
ron@jpax-build07:~/Downloads$ sudo dpkg --audit
[sudo] password for ron:
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 apt-xapian-index maintenance and search tools for a Xapian index of Debian
 cmake-data CMake data files (modules, templates and documentation)
 dwz DWARF compression tool
 libcomerr2:i386 transitional package
 libffi-dev:i386 Foreign Function Interface library (development files)
 libglib2.0-bin Programs for the GLib library
 libpsl5:amd64 Library for Public Suffix List (shared libraries)
 python3-apt Python 3 interface to libapt-pkg
 python3-brlapi:amd64 Braille display access via BRLTTY - Python3 bindings
 python3-dev header files and a static library for Python (default)
 python3-distutils distutils package for Python 3.x
 python3-lib2to3 Interactive high-level object-oriented language (2to3, ve
 python3-libapparmor AppArmor library Python3 bindings
 python3-lxml:amd64 pythonic binding for the libxml2 and libxslt libraries
 python3-pil:amd64 Python Imaging Library (Python3)
 uuid-dev:i386 Universally Unique ID library - headers and static librar

ron@jpax-build07:~/Downloads$ apt-cache policy python3 python3-minimal libglib2.0-bin libglib2.0-0
python3:
  Installed: 3.5.1-3
  Candidate: 3.5.1-3
  Version table:
 *** 3.5.1-3 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
python3-minimal:
  Installed: 3.7.3-1
  Candidate: 3.7.3-1
  Version table:
 *** 3.7.3-1 100
        100 /var/lib/dpkg/status
     3.5.1-3 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libglib2.0-bin:
  Installed: 2.60.0-1
  Candidate: 2.60.0-1
  Version table:
 *** 2.60.0-1 100
        100 /var/lib/dpkg/status
     2.48.2-0ubuntu4.4 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     2.48.0-1ubuntu4 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libglib2.0-0:
  Installed: 2.48.2-0ubuntu4.4
  Candidate: 2.48.2-0ubuntu4.4
  Version table:
 *** 2.48.2-0ubuntu4.4 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.48.0-1ubuntu4 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
Yes, I realize that I somehow got other packages onto my system butI'm not sure how to resolve this mess. Hence I appreciate any help I might receive in these regards!

Thanks a lot!

Manfred Hampl (m-hampl) said : #3

From your output:

$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco

I do not really know what you have done, but it seems that your system has already (at least partly) been upgraded to Ubuntu 19.04 (Disco)!

If you do not have a specific requirement that your system stays on Ubuntu 16.04 (xenial), then I would like to suggest to try completing the release-upgrade to 19.04

If you want to do that, I recommend the following test for a try-run:
1. replace "xenial" by "disco" in /etc/apt/sources.list
2. run "sudo apt update"
3. run "apt --simulate install -f" -> the questions if that would work or fail
To revert that you must replace "disco" by "xenial" in sources.list again and run another "sudo apt update"

cerr (ron-eggler) said : #4

yeah I'm seeing the output of lsb_release too. I have tried do-release-upgrade already but it wouldn't complete and hence ended up somewhere half way in the middle. I have no requirement to keep it on 12.04 hence, let's see:

I copied replaced xenial by disco in my sources.list:
 sudo apt update
Get:1 http://security.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]
Get:2 http://ca.archive.ubuntu.com/ubuntu disco InRelease [257 kB]
Get:3 http://security.ubuntu.com/ubuntu disco-security/restricted Sources [832 B]
Get:4 http://ca.archive.ubuntu.com/ubuntu disco-updates InRelease [97.5 kB]
Get:5 http://security.ubuntu.com/ubuntu disco-security/multiverse Sources [720 B]
Get:6 http://security.ubuntu.com/ubuntu disco-security/main Sources [58.9 kB]
Get:7 http://ca.archive.ubuntu.com/ubuntu disco-backports InRelease [88.8 kB]
Get:8 http://security.ubuntu.com/ubuntu disco-security/universe Sources [31.6 kB]
Get:9 http://security.ubuntu.com/ubuntu disco-security/main i386 Packages [168 kB]
Get:10 http://security.ubuntu.com/ubuntu disco-security/main amd64 Packages [210 kB]
Get:11 http://security.ubuntu.com/ubuntu disco-security/main Translation-en [74.6 kB]
Get:12 http://ca.archive.ubuntu.com/ubuntu disco/universe Sources [9,688 kB]
Get:13 http://security.ubuntu.com/ubuntu disco-security/main amd64 DEP-11 Metadata [37.6 kB]
Get:14 http://security.ubuntu.com/ubuntu disco-security/main DEP-11 64x64 Icons [27.4 kB]
Get:15 http://security.ubuntu.com/ubuntu disco-security/restricted amd64 Packages [3,816 B]
Get:16 http://security.ubuntu.com/ubuntu disco-security/restricted Translation-en [932 B]
Get:17 http://ca.archive.ubuntu.com/ubuntu disco/main Sources [838 kB]
Get:18 http://security.ubuntu.com/ubuntu disco-security/universe i386 Packages [250 kB]
Get:19 http://ca.archive.ubuntu.com/ubuntu disco/restricted Sources [6,412 B]
Get:20 http://security.ubuntu.com/ubuntu disco-security/universe amd64 Packages [255 kB]
Get:21 http://ca.archive.ubuntu.com/ubuntu disco/multiverse Sources [187 kB]
Get:22 http://security.ubuntu.com/ubuntu disco-security/universe Translation-en [73.3 kB]
Get:23 http://ca.archive.ubuntu.com/ubuntu disco/main i386 Packages [981 kB]
Get:24 http://security.ubuntu.com/ubuntu disco-security/universe amd64 DEP-11 Metadata [20.0 kB]
Get:25 http://security.ubuntu.com/ubuntu disco-security/universe DEP-11 64x64 Icons [49.7 kB]
Get:26 http://security.ubuntu.com/ubuntu disco-security/multiverse amd64 Packages [1,172 B]
Get:27 http://security.ubuntu.com/ubuntu disco-security/multiverse i386 Packages [1,344 B]
Get:28 http://ca.archive.ubuntu.com/ubuntu disco/main amd64 Packages [995 kB]
Get:29 http://security.ubuntu.com/ubuntu disco-security/multiverse Translation-en [632 B]
Get:30 http://ca.archive.ubuntu.com/ubuntu disco/main Translation-en [509 kB]
Get:31 http://ca.archive.ubuntu.com/ubuntu disco/main Translation-en_CA [391 kB]
Get:32 http://ca.archive.ubuntu.com/ubuntu disco/main amd64 DEP-11 Metadata [499 kB]
Get:33 http://ca.archive.ubuntu.com/ubuntu disco/main DEP-11 64x64 Icons [179 kB]
Get:34 http://ca.archive.ubuntu.com/ubuntu disco/restricted i386 Packages [11.1 kB]
Get:35 http://ca.archive.ubuntu.com/ubuntu disco/restricted amd64 Packages [14.0 kB]
Get:36 http://ca.archive.ubuntu.com/ubuntu disco/restricted Translation-en [4,960 B]
Get:37 http://ca.archive.ubuntu.com/ubuntu disco/universe amd64 Packages [9,065 kB]
Get:38 http://ca.archive.ubuntu.com/ubuntu disco/universe i386 Packages [9,008 kB]
Get:39 http://ca.archive.ubuntu.com/ubuntu disco/universe Translation-en_CA [4,050 kB]
Get:40 http://ca.archive.ubuntu.com/ubuntu disco/universe Translation-en [5,251 kB]
Get:41 http://ca.archive.ubuntu.com/ubuntu disco/universe amd64 DEP-11 Metadata [3,546 kB]
Get:42 http://ca.archive.ubuntu.com/ubuntu disco/universe DEP-11 64x64 Icons [8,369 kB]
Get:43 http://ca.archive.ubuntu.com/ubuntu disco/multiverse amd64 Packages [157 kB]
Get:44 http://ca.archive.ubuntu.com/ubuntu disco/multiverse i386 Packages [145 kB]
Get:45 http://ca.archive.ubuntu.com/ubuntu disco/multiverse Translation-en [112 kB]
Get:46 http://ca.archive.ubuntu.com/ubuntu disco/multiverse amd64 DEP-11 Metadata [51.3 kB]
Get:47 http://ca.archive.ubuntu.com/ubuntu disco/multiverse DEP-11 64x64 Icons [221 kB]
Get:48 http://ca.archive.ubuntu.com/ubuntu disco-updates/universe Sources [50.4 kB]
Get:49 http://ca.archive.ubuntu.com/ubuntu disco-updates/multiverse Sources [720 B]
Get:50 http://ca.archive.ubuntu.com/ubuntu disco-updates/main Sources [94.8 kB]
Get:51 http://ca.archive.ubuntu.com/ubuntu disco-updates/restricted Sources [832 B]
Get:52 http://ca.archive.ubuntu.com/ubuntu disco-updates/main i386 Packages [231 kB]
Get:53 http://ca.archive.ubuntu.com/ubuntu disco-updates/main amd64 Packages [276 kB]
Get:54 http://ca.archive.ubuntu.com/ubuntu disco-updates/main Translation-en [104 kB]
Get:55 http://ca.archive.ubuntu.com/ubuntu disco-updates/main amd64 DEP-11 Metadata [134 kB]
Get:56 http://ca.archive.ubuntu.com/ubuntu disco-updates/main DEP-11 64x64 Icons [44.2 kB]
Get:57 http://ca.archive.ubuntu.com/ubuntu disco-updates/restricted amd64 Packages [4,208 B]
Get:58 http://ca.archive.ubuntu.com/ubuntu disco-updates/restricted Translation-en [968 B]
Get:59 http://ca.archive.ubuntu.com/ubuntu disco-updates/universe amd64 Packages [308 kB]
Get:60 http://ca.archive.ubuntu.com/ubuntu disco-updates/universe i386 Packages [303 kB]
Get:61 http://ca.archive.ubuntu.com/ubuntu disco-updates/universe Translation-en [104 kB]
Get:62 http://ca.archive.ubuntu.com/ubuntu disco-updates/universe amd64 DEP-11 Metadata [64.4 kB]
Get:63 http://ca.archive.ubuntu.com/ubuntu disco-updates/universe DEP-11 64x64 Icons [101 kB]
Get:64 http://ca.archive.ubuntu.com/ubuntu disco-updates/multiverse i386 Packages [1,344 B]
Get:65 http://ca.archive.ubuntu.com/ubuntu disco-updates/multiverse amd64 Packages [1,172 B]
Get:66 http://ca.archive.ubuntu.com/ubuntu disco-updates/multiverse Translation-en [632 B]
Get:67 http://ca.archive.ubuntu.com/ubuntu disco-backports/universe Sources [1,584 B]
Get:68 http://ca.archive.ubuntu.com/ubuntu disco-backports/main Sources [1,352 B]
Get:69 http://ca.archive.ubuntu.com/ubuntu disco-backports/main i386 Packages [1,216 B]
Get:70 http://ca.archive.ubuntu.com/ubuntu disco-backports/main amd64 Packages [1,220 B]
Get:71 http://ca.archive.ubuntu.com/ubuntu disco-backports/main Translation-en [684 B]
Get:72 http://ca.archive.ubuntu.com/ubuntu disco-backports/universe i386 Packages [3,440 B]
Get:73 http://ca.archive.ubuntu.com/ubuntu disco-backports/universe amd64 Packages [3,436 B]
Get:74 http://ca.archive.ubuntu.com/ubuntu disco-backports/universe Translation-en [1,532 B]
Get:75 http://ca.archive.ubuntu.com/ubuntu disco-backports/universe amd64 DEP-11 Metadata [7,920 B]
Get:76 http://ca.archive.ubuntu.com/ubuntu disco-backports/universe DEP-11 64x64 Icons [29 B]
Fetched 57.9 MB in 1min 55s (505 kB/s)

(appstreamcli:3178): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed

(appstreamcli:3178): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
Building dependency tree
Reading state information... Done

2482 packages can be upgraded. Run 'apt list --upgradable' to see them.
$ sudo apt --simulate install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 apt-xapian-index : Depends: python3-xapian (>= 1.4.3-1)
 cmake : Depends: cmake-data (= 3.5.1-1ubuntu3) but 3.13.4-1 is installed
 libcairo2-dev:i386 : Depends: libfontconfig1-dev:i386 (>= 2.2.95) but it is not installed
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.60.0-1) but 2.48.2-0ubuntu4.4 is installed
 libglib2.0-dev:i386 : Depends: libglib2.0-bin:i386 (= 2.48.2-0ubuntu4.4)
 python3 : PreDepends: python3-minimal (= 3.5.1-3) but 3.7.3-1 is installed
           Depends: libpython3-stdlib (= 3.5.1-3) but 3.7.3-1 is installed
 python3-apt : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-brlapi : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-dev : Depends: python3 (= 3.7.3-1) but 3.5.1-3 is installed
 python3-distutils : Depends: python3 (>= 3.7.1-1~) but 3.5.1-3 is installed
 python3-lib2to3 : Depends: python3 (>= 3.7.1-1~) but 3.5.1-3 is installed
 python3-libapparmor : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-lxml : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-pil : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
               Recommends: python3-olefile but it is not installed
 testdrive-common : Depends: qemu-kvm or
                             kvm (>= 1:84+dfsg-0ubuntu12.4) but it is not installable or
                             virtualbox (>= 4.0) but it is not installed
                    Recommends: kvm-pxe but it is not installable
 virtualbox-ext-pack : Depends: virtualbox (< 5.1.38-dfsg-z) but it is not installed or
                                virtualbox-5.1 but it is not installable
                       Depends: virtualbox (>= 5.1.38-dfsg-0~) but it is not installed or
                                virtualbox-5.1 but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Manfred Hampl (m-hampl) said : #5

Ok. Apparently you have only a low number of packages already on "disco" level, and even when trying to use the repositories for disco, there are still similar broken dependencies.

It is necessary to get the broken dependencies (especially those with python3) solved. Without that a package installation or update is possible neither in xenial nor disco. Due to the fact that there seem more packages still on "xenial" level, I suggest to try the repair on "xenial".

If you want, these could be the next steps:

1. Change back from "disco" to "xenial" in /etc/apt/sources.list and run "sudo apt update"

2. Issue the command
sudo dpkg --remove virtualbox-ext-pack testdrive-common libcairo2-dev cmake apt-xapian-index
to remove some of the packages with broken dependencies. These packages should not be needed in the next steps and can be reinstalled when everything is fine again. Please report the results.

After that issue the command
sudo apt --simulate install -f
and show the output, it will hopefully be shorter.

3. Copy/paste the output of the commands
dpkg -l | grep 3.7.3-1
dpkg -l | grep 3.5.1-3
This should list the python3 packages in the different versions.
Based on that output it should be possible to identify the packages that have to be downgraded.

4. The same for the glib package
dpkg -l | grep 2.60.0-1
dpkg -l | grep 2.48.2-0ubu

cerr (ron-eggler) said : #6

Okay,copied my old sources. list back into it's original position (xenial)
ran apt update
$ sudo dpkg --remove virtualbox-ext-pack testdrive-common libcairo2-dev cmake apt-xapian-index
(Reading database ... 367144 files and directories currently installed.)
Removing virtualbox-ext-pack (5.1.38-0ubuntu1.16.04.1) ...
/var/lib/dpkg/info/virtualbox-ext-pack.prerm: 4: /var/lib/dpkg/info/virtualbox-ext-pack.prerm: vboxmanage: not found
dpkg: error processing package virtualbox-ext-pack (--remove):
 subprocess installed pre-removal script returned error exit status 127
dpkg: dependency problems prevent removal of testdrive-common:
 testdrive-cli depends on testdrive-common (= 3.27-0ubuntu1).

dpkg: error processing package testdrive-common (--remove):
 dependency problems - not removing
Removing libcairo2-dev:i386 (1.14.6-1) ...
Removing cmake (3.5.1-1ubuntu3) ...
dpkg: dependency problems prevent removal of apt-xapian-index:
 libqapt3 depends on apt-xapian-index.

dpkg: error processing package apt-xapian-index (--remove):
 dependency problems - not removing
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 virtualbox-ext-pack
 testdrive-common
 apt-xapian-index

$ sudo apt --simulate install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 apt-xapian-index : Depends: python3-xapian (>= 1.4.3-1)
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.60.0-1) but 2.48.2-0ubuntu4.4 is installed
 libglib2.0-dev:i386 : Depends: libglib2.0-bin:i386 (= 2.48.2-0ubuntu4.4)
 python3 : PreDepends: python3-minimal (= 3.5.1-3) but 3.7.3-1 is installed
           Depends: libpython3-stdlib (= 3.5.1-3) but 3.7.3-1 is installed
 python3-apt : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-brlapi : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-dev : Depends: python3 (= 3.7.3-1) but 3.5.1-3 is installed
 python3-distutils : Depends: python3 (>= 3.7.1-1~) but 3.5.1-3 is installed
 python3-lib2to3 : Depends: python3 (>= 3.7.1-1~) but 3.5.1-3 is installed
 python3-libapparmor : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-lxml : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-pil : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
               Recommends: python3-olefile but it is not installable
 testdrive-common : Depends: qemu-kvm or
                             kvm (>= 1:84+dfsg-0ubuntu12.4) or
                             virtualbox (>= 4.0) but it is not installed
                    Recommends: kvm-pxe but it is not installable
 virtualbox-ext-pack : Depends: virtualbox (< 5.1.38-dfsg-z) but it is not installed or
                                virtualbox-5.1 but it is not installable
                       Depends: virtualbox (>= 5.1.38-dfsg-0~) but it is not installed or
                                virtualbox-5.1 but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

I then also went ahead and tried the following:

$ sudo dpkg --remove virtualbox-ext-pack
(Reading database ... 367089 files and directories currently installed.)
Removing virtualbox-ext-pack (5.1.38-0ubuntu1.16.04.1) ...
/var/lib/dpkg/info/virtualbox-ext-pack.prerm: 4: /var/lib/dpkg/info/virtualbox-ext-pack.prerm: vboxmanage: not found
dpkg: error processing package virtualbox-ext-pack (--remove):
 subprocess installed pre-removal script returned error exit status 127
Errors were encountered while processing:
 virtualbox-ext-pack

ron@jpax-build07:/etc/apt$ sudo dpkg --remove testdrive-common
dpkg: dependency problems prevent removal of testdrive-common:
 testdrive-cli depends on testdrive-common (= 3.27-0ubuntu1).

dpkg: error processing package testdrive-common (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 testdrive-common

ron@jpax-build07:/etc/apt$ sudo dpkg --remove testdrive-cli
(Reading database ... 367089 files and directories currently installed.)
Removing testdrive-cli (3.27-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...

ron@jpax-build07:/etc/apt$ sudo dpkg --remove testdrive-common
(Reading database ... 367084 files and directories currently installed.)
Removing testdrive-common (3.27-0ubuntu1) ...

ron@jpax-build07:/etc/apt$ sudo dpkg --remove libcairo2-dev
dpkg: warning: ignoring request to remove libcairo2-dev which isn't installed

ron@jpax-build07:/etc/apt$ sudo dpkg --remove cmake
dpkg: warning: ignoring request to remove cmake, only the config
 files of which are on the system; use --purge to remove them too

can I safey run sudo dpkg --purge cmake ?

ron@jpax-build07:/etc/apt$ sudo dpkg --remove apt-xapian-index
dpkg: dependency problems prevent removal of apt-xapian-index:
 libqapt3 depends on apt-xapian-index.

dpkg: error processing package apt-xapian-index (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 apt-xapian-index

Manfred Hampl (m-hampl) said : #7

Well done, some broken packages have been cleared.
Nevertheless the core problem with python3-* is open.

I still recommend to clean up the other packages as far as possible:
issue the command
sudo gedit /var/lib/dpkg/info/virtualbox-ext-pack.prerm
in the editor that opens put a comment indicator (#) in front of lines 4 and 5 (those starting with vboxmanage), save the file and close the editor.
then re-run
sudo dpkg --remove virtualbox-ext-pack

And finally (copied from above):

After that issue the command
 sudo apt --simulate install -f
 and show the output, it will hopefully be shorter.

3. Copy/paste the output of the commands
 dpkg -l | grep 3.7.3-1
 dpkg -l | grep 3.5.1-3
 This should list the python3 packages in the different versions.
 Based on that output it should be possible to identify the packages that have to be downgraded.

4. The same for the glib package
 dpkg -l | grep 2.60.0-1
 dpkg -l | grep 2.48.2-0ubu

cerr (ron-eggler) said : #8

Okay yes,

looks like we're getting somewhere now
sudo apt --simulate instal -f actually spit out a really long list of packets that started with:
$ sudo apt --simulate install -f | less

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  cabextract cmake-data cpu-checker dwz gcc-5-base:i386 gir1.2-click-0.4
  gir1.2-freedesktop:i386 gir1.2-gee-0.8 gir1.2-glib-2.0:i386
  gir1.2-pango-1.0:i386 libblkid1:i386 libbonobo2-0 libbonobo2-common
  libcairo-gobject2:i386 libcairo-script-interpreter2:i386 libclick-0.4-0
  libcomerr2:i386 libexpat1-dev:i386 libffi-dev:i386 libfreetype6-dev:i386
  libgirepository-1.0-1:i386 libgsoap8 libice-dev:i386 libimagequant0
  libjs-sphinxdoc liblzo2-2:i386 libmount1:i386 libmspack0 liborbit-2-0
  libpixman-1-dev:i386 libpng12-dev:i386 libpsl5 libpython3-dev
  libpython3.5-dev libpython3.7 libpython3.7-dev libsdl1.2debian
  libsm-dev:i386 libsnapd-glib1 libvncserver1 libwebp6 libwebpdemux2
  libwebpmux3 libxapian-1.3-5 libxcb-render0-dev:i386 libxcb-shm0-dev:i386
  libxrender-dev:i386 libzstd1:i386 msr-tools plasma-discover-common
  python-apt python-sip-dev python-xdg python3.5-dev python3.7-dev sip-dev
  uuid-dev:i386 x11proto-render-dev zsync
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  dleyna-server gnome-control-center gnome-control-center-data
  gnome-icon-theme gnome-icon-theme-symbolic gnome-online-accounts
  gnome-settings-daemon iio-sensor-proxy libcolord-gtk1
  libdleyna-connector-dbus-1.0-1 libdleyna-core-1.0-3 libglib2.0-bin:i386
  libgoa-backend-1.0-1 libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 python-sip-dev
  realmd
Suggested packages:
  python-sip-doc
Recommended packages:
  ibus system-config-printer-gnome ubuntu-system-service
The following packages will be REMOVED:
  aisleriot apparmor apparmor-easyprof apparmor-easyprof-ubuntu apport
  apport-gtk apport-kde apt-xapian-index aptdaemon apturl apturl-common
  apturl-kde click click-apparmor command-not-found compiz compiz-gnome
  dh-python firefox foomatic-db-compressed-ppds gconf2 gedit gir1.2-ibus-1.0
  gnome-menus gnome-orca gnome-software gnome-terminal gstreamer-qapt hplip
  hplip-data ibus ibus-table kubuntu-driver-manager
  kubuntu-notification-helper language-selector-common language-selector-gnome
  libglib2.0-bin libgnome-2-0 libgnome2-common libgnomevfs2-0
  libgnomevfs2-common libkubuntu1 libpurple-bin libqapt3 libqapt3-runtime
  lsb-release nautilus-share onboard onboard-data openprinting-ppds
  plainbox-provider-checkbox plainbox-provider-resource-generic
...
...
...
The following NEW packages will be installed:
  dleyna-server gnome-control-center gnome-control-center-data
  gnome-icon-theme gnome-icon-theme-symbolic gnome-online-accounts

so I guess to clean it up I need to do an "autoremove" first

$ dpkg -l | grep 3.7.3-1
ii libpython3-dev:amd64 3.7.3-1 amd64 header files and a static library for Python (default)
ii libpython3-stdlib:amd64 3.7.3-1 amd64 interactive high-level object-oriented language (default python3 version)
iU python3-dev 3.7.3-1 amd64 header files and a static library for Python (default)
iU python3-distutils 3.7.3-1ubuntu1 all distutils package for Python 3.x
iU python3-lib2to3 3.7.3-1ubuntu1 all Interactive high-level object-oriented language (2to3, version 3.6)
ii python3-minimal 3.7.3-1 amd64 minimal subset of the Python language (default python3 version)

$ dpkg -l | grep 3.5.1-3
ii python3 3.5.1-3 amd64 interactive high-level object-oriented language (default python3 version)

$ dpkg -l | grep 2.60.0-1
iU libglib2.0-bin 2.60.0-1 amd64 Programs for the GLib library

$ dpkg -l | grep 2.48.2-0ubu
ii libglib2.0-0:amd64 2.48.2-0ubuntu4.4 amd64 GLib library of C routines
ii libglib2.0-0:i386 2.48.2-0ubuntu4.4 i386 GLib library of C routines
ii libglib2.0-data 2.48.2-0ubuntu4.4 all Common files for GLib library
ii libglib2.0-dev:i386 2.48.2-0ubuntu4.4 i386 Development files for the GLib library
r

Manfred Hampl (m-hampl) said : #9

Ok, the output of "apt install -f" is not too good, because as a solution for your problem the package management wants to uninstall lots of packages. I cannot imagine that this is what you want.

My suggestion to downgrade the python and glib packages to the correct version:
sudo dpkg --remove python3-dev
sudo dpkg --remove python3-distutils
sudo dpkg --remove python3-lib2to3
cd ~
mkdir tempwork
cd tempwork
wget https://launchpad.net/ubuntu/+archive/primary/+files/libpython3-dbg_3.5.1-3_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libpython3-stdlib_3.5.1-3_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/python3-minimal_3.5.1-3_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libglib2.0-bin_2.48.2-0ubuntu4.4_amd64.deb
sudo dpkg --force-downgrade --install *.deb

Maybe you should stop at the first error message (depending on its severity) and report the results that I can re-check my assumptions.
Maybe the dpkg command needs also --force-depends as additional option.

cerr (ron-eggler) said : #10

Hm, I got an error from the get go:

$ sudo dpkg --remove python3-dev
[sudo] password for ron:
dpkg: dependency problems prevent removal of python3-dev:
 python3-sip-dev depends on python3-dev.

dpkg: error processing package python3-dev (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 python3-dev

I'm unsure if you wanted me to try:
sudo dpkg --remove --force python3-dev
instead but better safe than sorry.... so I just report the result...

Thanks Manfred for sticking with me until here and helping me out! Your assistance is greatly appreciated!

Manfred Hampl (m-hampl) said : #11

You better wait with forcing, there should be other ways.

Try
sudo dpkg --remove python3-sip-dev python3-dev

and report the results.

cerr (ron-eggler) said : #12

This gave me the following:

$ sudo dpkg --remove python3-sip-dev python3-dev
[sudo] password for ron:
dpkg: dependency problems prevent removal of python3-sip-dev:
 pyqt5-dev depends on python3-sip-dev | python-sip-dev; however:
  Package python3-sip-dev is to be removed.
  Package python-sip-dev is not installed.

dpkg: error processing package python3-sip-dev (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of python3-dev:
 python3-sip-dev depends on python3-dev.

dpkg: error processing package python3-dev (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 python3-sip-dev
 python3-dev

I'm confused, it first says " Package python3-sip-dev is to be removed." but then it still cannot remove it due to dependency problems with python3-dev ...hmm....

Manfred Hampl (m-hampl) said : #13

The error message is a bit confusing, but correct - don't mix up python3-sip-dev and python-sip-dev.

General remark: the *-dev packages usually are optional and only needed when compliling software.
My current aim is removing all broken packages except important ones (python, glib).

Try
sudo dpkg --remove pyqt5-dev python3-sip-dev python3-dev

If this fails because of another dependency on a *-dev package, add this one as well, etc.

cerr (ron-eggler) said : #14

Great,

This worked fine:
$ sudo dpkg --remove pyqt5-dev python3-sip-dev python3-dev
[sudo] password for ron:
(Reading database ... 367065 files and directories currently installed.)
Removing pyqt5-dev (5.5.1+dfsg-3ubuntu4) ...
Removing python3-sip-dev (4.17+dfsg-1build1) ...
Removing python3-dev (3.7.3-1) ...
Processing triggers for man-db (2.7.5-1) ...

Manfred Hampl (m-hampl) said : #15

Ok, the first packages with broken dependencies have been cleared (by removing them).

Now continue with

sudo dpkg --remove python3-distutils
sudo dpkg --remove python3-lib2to3
cd ~
mkdir tempwork
cd tempwork
wget https://launchpad.net/ubuntu/+archive/primary/+files/libpython3-dbg_3.5.1-3_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libpython3-stdlib_3.5.1-3_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/python3-minimal_3.5.1-3_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libglib2.0-bin_2.48.2-0ubuntu4.4_amd64.deb
sudo dpkg --force-downgrade --install *.deb

(Again: you probably better stop when you get an error message)

cerr (ron-eggler) said : #16

Hi,

Okay, I gpt the following:

$ ls -l
total 80
-rw-rw-r-- 1 ron ron 39510 Aug 5 09:41 libglib2.0-bin_2.48.2-0ubuntu4.4_amd64.deb
-rw-rw-r-- 1 ron ron 6868 Mar 23 2016 libpython3-dbg_3.5.1-3_amd64.deb
-rw-rw-r-- 1 ron ron 6818 Mar 23 2016 libpython3-stdlib_3.5.1-3_amd64.deb
-rw-rw-r-- 1 ron ron 23300 Mar 23 2016 python3-minimal_3.5.1-3_amd64.deb
ron@jpax-build07:~/tempwork$ sudo dpkg --force-downgrade --install *.deb
[sudo] password for ron:
dpkg: warning: downgrading libglib2.0-bin from 2.60.0-1 to 2.48.2-0ubuntu4.4
(Reading database ... 365988 files and directories currently installed.)
Preparing to unpack libglib2.0-bin_2.48.2-0ubuntu4.4_amd64.deb ...
Unpacking libglib2.0-bin (2.48.2-0ubuntu4.4) over (2.60.0-1) ...
Selecting previously unselected package libpython3-dbg:amd64.
Preparing to unpack libpython3-dbg_3.5.1-3_amd64.deb ...
Unpacking libpython3-dbg:amd64 (3.5.1-3) ...
dpkg: warning: downgrading libpython3-stdlib:amd64 from 3.7.3-1 to 3.5.1-3
Preparing to unpack libpython3-stdlib_3.5.1-3_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.5.1-3) over (3.7.3-1) ...
dpkg: warning: downgrading python3-minimal from 3.7.3-1 to 3.5.1-3
Preparing to unpack python3-minimal_3.5.1-3_amd64.deb ...
Unpacking python3-minimal (3.5.1-3) over (3.7.3-1) ...
Setting up libglib2.0-bin (2.48.2-0ubuntu4.4) ...
dpkg: dependency problems prevent configuration of libpython3-dbg:amd64:
 libpython3-dbg:amd64 depends on libpython3.5-dbg (>= 3.5.1-2~); however:
  Package libpython3.5-dbg is not installed.

dpkg: error processing package libpython3-dbg:amd64 (--install):
 dependency problems - leaving unconfigured
Setting up libpython3-stdlib:amd64 (3.5.1-3) ...
Setting up python3-minimal (3.5.1-3) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 libpython3-dbg:amd64

Manfred Hampl (m-hampl) said : #17

This looks already quite good, but - sorry - I made an error and copied a wrong address (libpython3-dbg instead of libpython3-doc).

Now let's see what the output is of the following commands:

sudo dpkg --audit
sudo dpkg --configure -a
sudo dpkg --audit
apt --simulate install -f

cerr (ron-eggler) said : #18

k$ sudo dpkg --audit
[sudo] password for ron:
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 apt-xapian-index maintenance and search tools for a Xapian index of Debian
 cmake-data CMake data files (modules, templates and documentation)
 dwz DWARF compression tool
 libcomerr2:i386 transitional package
 libffi-dev:i386 Foreign Function Interface library (development files)
 libpsl5:amd64 Library for Public Suffix List (shared libraries)
 libpython3-dbg:amd64 debug build of the Python 3 Interpreter (version 3.5)
 python3-apt Python 3 interface to libapt-pkg
 python3-brlapi:amd64 Braille display access via BRLTTY - Python3 bindings
 python3-libapparmor AppArmor library Python3 bindings
 python3-lxml:amd64 pythonic binding for the libxml2 and libxslt libraries
 python3-pil:amd64 Python Imaging Library (Python3)
 uuid-dev:i386 Universally Unique ID library - headers and static librar

$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python3-pil:amd64:
 python3-pil:amd64 depends on python3 (>= 3.7~); however:
  Version of python3 on system is 3.5.1-3.

dpkg: error processing package python3-pil:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-apt:
 python3-apt depends on python3 (>= 3.7~); however:
  Version of python3 on system is 3.5.1-3.

dpkg: error processing package python3-apt (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-lxml:amd64:
 python3-lxml:amd64 depends on python3 (>= 3.7~); however:
  Version of python3 on system is 3.5.1-3.

dpkg: error processing package python3-lxml:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-brlapi:amd64:
 python3-brlapi:amd64 depends on python3 (>= 3.7~); however:
  Version of python3 on system is 3.5.1-3.

dpkg: error processing package python3-brlapi:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-libapparmor:
 python3-libapparmor depends on python3 (>= 3.7~); however:
  Version of python3 on system is 3.5.1-3.

dpkg: error processing package python3-libapparmor (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpython3-dbg:amd64:
 libpython3-dbg:amd64 depends on libpython3.5-dbg (>= 3.5.1-2~); however:
  Package libpython3.5-dbg is not installed.

dpkg: error processing package libpython3-dbg:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3-pil:amd64
 python3-apt
 python3-lxml:amd64
 python3-brlapi:amd64
 python3-libapparmor
 libpython3-dbg:amd64
ron@jpax-build07:~/tempwork$ sudo dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 apt-xapian-index maintenance and search tools for a Xapian index of Debian
 cmake-data CMake data files (modules, templates and documentation)
 dwz DWARF compression tool
 libcomerr2:i386 transitional package
 libffi-dev:i386 Foreign Function Interface library (development files)
 libpsl5:amd64 Library for Public Suffix List (shared libraries)
 libpython3-dbg:amd64 debug build of the Python 3 Interpreter (version 3.5)
 python3-apt Python 3 interface to libapt-pkg
 python3-brlapi:amd64 Braille display access via BRLTTY - Python3 bindings
 python3-libapparmor AppArmor library Python3 bindings
 python3-lxml:amd64 pythonic binding for the libxml2 and libxslt libraries
 python3-pil:amd64 Python Imaging Library (Python3)
 uuid-dev:i386 Universally Unique ID library - headers and static librar

$ sudo apt --simulate install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 apt-xapian-index : Depends: python3-xapian (>= 1.4.3-1)
 libpython3-dbg : Depends: libpython3.5-dbg (>= 3.5.1-2~) but it is not installed
 python3-apt : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-brlapi : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-libapparmor : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-lxml : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
 python3-pil : Depends: python3 (>= 3.7~) but 3.5.1-3 is installed
               Recommends: python3-olefile but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
ron@jpax-build07:~/tempwork$

Manfred Hampl (m-hampl) said : #19

It is going forward.

What is now the output of
sudo dpkg --remove libpython3-dbg
apt-cache policy apt-xapian-index python3-apt python3-brlapi python3-libapparmor python3-lxml python3-pil

cerr (ron-eggler) said : #20

Yes, starts to feel good again! Thank you very much, I much appreciate your patience here!

$ sudo dpkg --remove libpython3-dbg
[sudo] password for ron:
(Reading database ... 365994 files and directories currently installed.)
Removing libpython3-dbg:amd64 (3.5.1-3) ...
Processing triggers for man-db (2.7.5-1) ...

$ apt-cache policy apt-xapian-index python3-apt python3-brlapi python3-libapparmor python3-lxml
apt-xapian-index:
  Installed: 0.47ubuntu13
  Candidate: 0.47ubuntu13
  Version table:
 *** 0.47ubuntu13 100
        100 /var/lib/dpkg/status
     0.47ubuntu8.4 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages
     0.47ubuntu8 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://ca.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
python3-apt:
  Installed: 1.8.4
  Candidate: 1.8.4
  Version table:
 *** 1.8.4 100
        100 /var/lib/dpkg/status
     1.1.0~beta1ubuntu0.16.04.5 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     1.1.0~beta1build1 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
python3-brlapi:
  Installed: 5.6-10ubuntu1
  Candidate: 5.6-10ubuntu1
  Version table:
 *** 5.6-10ubuntu1 100
        100 /var/lib/dpkg/status
     5.3.1-2ubuntu2.1 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     5.3.1-2ubuntu2 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
python3-libapparmor:
  Installed: 2.13.2-9ubuntu6
  Candidate: 2.13.2-9ubuntu6
  Version table:
 *** 2.13.2-9ubuntu6 100
        100 /var/lib/dpkg/status
     2.10.95-0ubuntu2.11 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     2.10.95-0ubuntu2 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
python3-lxml:
  Installed: 4.3.3-1
  Candidate: 4.3.3-1
  Version table:
 *** 4.3.3-1 100
        100 /var/lib/dpkg/status
     3.5.0-1ubuntu0.1 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     3.5.0-1build1 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

What does this now mean?
500 means installable, and it shows for each of these packages....

I've got to go carefully back through the whole process to understand what you had me doing throughout the whole process - then next time, should this happen again, I can fix it by myself...! (maybe)

Manfred Hampl (m-hampl) said : #21

The numbers in apt cache show the priority. The version with the highest number is installed, unless there is a downgrade required.

Try the following command

apt --simulate install -f apt-xapian-index=0.47ubuntu8.4 python3-apt=1.1.0~beta1ubuntu0.16.04.5 python3-brlapi= 5.3.1-2ubuntu2.1 python3-libapparmor=2.10.95-0ubuntu2.11 python3-lxml=3.5.0-1ubuntu0.1 python3-pil=3.1.2-0ubuntu1.1

Note, this is one long command spanning two or three lines. Copy/paste the whole command at once.

cerr (ron-eggler) said : #22

$ sudo apt --simulate install -f apt-xapian-index=0.47ubuntu8.4 python3-apt=1.1.0~beta1ubuntu0.16.04.5 python3-brlapi= 5.3.1-2ubuntu2.1 python3-libapparmor=2.10.95-0ubuntu2.11 python3-lxml=3.5.0-1ubuntu0.1 python3-pil=3.1.2-0ubuntu1.1
[sudo] password for ron:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '' for 'python3-brlapi' was not found
E: Unable to locate package 5.3.1-2ubuntu2.1
E: Couldn't find any package by glob '5.3.1-2ubuntu2.1'
E: Couldn't find any package by regex '5.3.1-2ubuntu2.1'

Manfred Hampl (m-hampl) said : #23

Sorry, my fault, there is an extra space character where it shouldn't be.
Try again with

apt --simulate install -f apt-xapian-index=0.47ubuntu8.4 python3-apt=1.1.0~beta1ubuntu0.16.04.5 python3-brlapi=5.3.1-2ubuntu2.1 python3-libapparmor=2.10.95-0ubuntu2.11 python3-lxml=3.5.0-1ubuntu0.1 python3-pil=3.1.2-0ubuntu1.1

cerr (ron-eggler) said : #24

Okay, now I got this:

$ sudo apt --simulate install -f apt-xapian-index=0.47ubuntu8.4 python3-apt=1.1.0~beta1ubuntu0.16.04.5 python3-brlapi= 5.3.1-2ubuntu2.1 python3-libapparmor=2.10.95-0ubuntu2.11 python3-lxml=3.5.0-1ubuntu0.1 python3-pil=3.1.2-0ubuntu1.1
[sudo] password for ron:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '' for 'python3-brlapi' was not found
E: Unable to locate package 5.3.1-2ubuntu2.1
E: Couldn't find any package by glob '5.3.1-2ubuntu2.1'
E: Couldn't find any package by regex '5.3.1-2ubuntu2.1'
ron@jpax-build07:~/tempwork$
ron@jpax-build07:~/tempwork$
ron@jpax-build07:~/tempwork$ sudo apt --simulate install -f apt-xapian-index=0.47ubuntu8.4 python3-apt=1.1.0~beta1ubuntu0.16.04.5 python3-brlapi=5.3.1-2ubuntu2.1 python3-libapparmor=2.10.95-0ubuntu2.11 python3-lxml=3.5.0-1ubuntu0.1 python3-pil=3.1.2-0ubuntu1.1
[sudo] password for ron:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cmake-data cpu-checker dwz gcc-5-base:i386 gir1.2-freedesktop:i386 gir1.2-glib-2.0:i386 gir1.2-pango-1.0:i386 gnome-orca libblkid1:i386 libcairo-gobject2:i386 libcairo-script-interpreter2:i386 libcomerr2:i386 libexpat1-dev:i386
  libffi-dev:i386 libfreetype6-dev:i386 libgirepository-1.0-1:i386 libgsoap8 libice-dev:i386 libimagequant0 liblzo2-2:i386 libmount1:i386 libpixman-1-dev:i386 libpng12-dev:i386 libpsl5 libpython3-dev libpython3.5-dev libpython3.7
  libpython3.7-dev libpython3.7-minimal libpython3.7-stdlib libreadline8 libsdl1.2debian libsm-dev:i386 libvncserver1 libwebp6 libwebpdemux2 libwebpmux3 libxcb-render0-dev:i386 libxcb-shm0-dev:i386 libxrender-dev:i386 libzstd1:i386
  msr-tools python-xdg python3.5-dev python3.7 python3.7-dev python3.7-minimal sip-dev uuid-dev:i386 x11proto-render-dev zsync
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  python3-apt-dbg python-apt-doc python3-lxml-dbg python-lxml-doc python-pil-doc python3-pil-dbg
The following packages will be DOWNGRADED:
  apt-xapian-index python3-apt python3-brlapi python3-libapparmor python3-lxml python3-pil
0 upgraded, 0 newly installed, 6 downgraded, 0 to remove and 56 not upgraded.
12 not fully installed or removed.
Inst python3-apt [1.8.4] (1.1.0~beta1ubuntu0.16.04.5 Ubuntu:16.04/xenial-updates [amd64]) [python3-libapparmor:amd64 apt-xapian-index:amd64 python3-brlapi:amd64 python3-pil:amd64 python3-lxml:amd64 ]
Inst apt-xapian-index [0.47ubuntu13] (0.47ubuntu8.4 Ubuntu:16.04/xenial-updates [all]) [python3-libapparmor:amd64 python3-brlapi:amd64 python3-pil:amd64 python3-lxml:amd64 ]
Inst python3-lxml [4.3.3-1] (3.5.0-1ubuntu0.1 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64]) [python3-libapparmor:amd64 python3-brlapi:amd64 python3-pil:amd64 ]
Inst python3-pil [5.4.1-1] (3.1.2-0ubuntu1.1 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64]) [python3-libapparmor:amd64 python3-brlapi:amd64 ]
Inst python3-brlapi [5.6-10ubuntu1] (5.3.1-2ubuntu2.1 Ubuntu:16.04/xenial-updates [amd64]) [python3-libapparmor:amd64 ]
Inst python3-libapparmor [2.13.2-9ubuntu6] (2.10.95-0ubuntu2.11 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
Conf python3-apt (1.1.0~beta1ubuntu0.16.04.5 Ubuntu:16.04/xenial-updates [amd64])
Conf apt-xapian-index (0.47ubuntu8.4 Ubuntu:16.04/xenial-updates [all])
Conf python3-lxml (3.5.0-1ubuntu0.1 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
Conf python3-pil (3.1.2-0ubuntu1.1 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
Conf python3-brlapi (5.3.1-2ubuntu2.1 Ubuntu:16.04/xenial-updates [amd64])
Conf python3-libapparmor (2.10.95-0ubuntu2.11 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
Conf libcomerr2:i386 (1.44.6-1 [i386])
Conf libpsl5 (0.20.2-2 [amd64])
Conf libffi-dev:i386 (3.2.1-9 [i386])
Conf dwz (0.12-3 [amd64])
Conf cmake-data (3.13.4-1 [all])
Conf uuid-dev:i386 (2.33.1-0.1ubuntu2 [i386])

Manfred Hampl (m-hampl) said : #25

The simulation does not show any error any more, now try the real execution:

sudo apt install -f apt-xapian-index=0.47ubuntu8.4 python3-apt=1.1.0~beta1ubuntu0.16.04.5 python3-brlapi=5.3.1-2ubuntu2.1 python3-libapparmor=2.10.95-0ubuntu2.11 python3-lxml=3.5.0-1ubuntu0.1 python3-pil=3.1.2-0ubuntu1.1

cerr (ron-eggler) said : #26

$ sudo apt install -f apt-xapian-index=0.47ubuntu8.4 python3-apt=1.1.0~beta1ubuntu0.16.04.5 python3-brlapi=5.3.1-2ubuntu2.1 python3-libapparmor=2.10.95-0ubuntu2.11 python3-lxml=3.5.0-1ubuntu0.1 python3-pil=3.1.2-0ubuntu1.1
[sudo] password for ron:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cmake-data cpu-checker dwz gcc-5-base:i386 gir1.2-freedesktop:i386 gir1.2-glib-2.0:i386 gir1.2-pango-1.0:i386 gnome-orca libblkid1:i386 libcairo-gobject2:i386 libcairo-script-interpreter2:i386 libcomerr2:i386 libexpat1-dev:i386
  libffi-dev:i386 libfreetype6-dev:i386 libgirepository-1.0-1:i386 libgsoap8 libice-dev:i386 libimagequant0 liblzo2-2:i386 libmount1:i386 libpixman-1-dev:i386 libpng12-dev:i386 libpsl5 libpython3-dev libpython3.5-dev libpython3.7
  libpython3.7-dev libpython3.7-minimal libpython3.7-stdlib libreadline8 libsdl1.2debian libsm-dev:i386 libvncserver1 libwebp6 libwebpdemux2 libwebpmux3 libxcb-render0-dev:i386 libxcb-shm0-dev:i386 libxrender-dev:i386 libzstd1:i386
  msr-tools python-xdg python3.5-dev python3.7 python3.7-dev python3.7-minimal sip-dev uuid-dev:i386 x11proto-render-dev zsync
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  python3-apt-dbg python-apt-doc python3-lxml-dbg python-lxml-doc python-pil-doc python3-pil-dbg
The following packages will be DOWNGRADED:
  apt-xapian-index python3-apt python3-brlapi python3-libapparmor python3-lxml python3-pil
0 upgraded, 0 newly installed, 6 downgraded, 0 to remove and 56 not upgraded.
12 not fully installed or removed.
Need to get 1,396 kB of archives.
After this operation, 1,499 kB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-apt amd64 1.1.0~beta1ubuntu0.16.04.5 [138 kB]
Get:2 http://ca.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 apt-xapian-index all 0.47ubuntu8.4 [56.9 kB]
Get:3 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-lxml amd64 3.5.0-1ubuntu0.1 [810 kB]
Get:4 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-pil amd64 3.1.2-0ubuntu1.1 [313 kB]
Get:5 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-brlapi amd64 5.3.1-2ubuntu2.1 [50.7 kB]
Get:6 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-libapparmor amd64 2.10.95-0ubuntu2.11 [26.9 kB]
Fetched 1,396 kB in 8s (186 kB/s)
dpkg: warning: downgrading python3-apt from 1.8.4 to 1.1.0~beta1ubuntu0.16.04.5
(Reading database ... 365988 files and directories currently installed.)
Preparing to unpack .../python3-apt_1.1.0~beta1ubuntu0.16.04.5_amd64.deb ...
Unpacking python3-apt (1.1.0~beta1ubuntu0.16.04.5) over (1.8.4) ...
dpkg: warning: downgrading apt-xapian-index from 0.47ubuntu13 to 0.47ubuntu8.4
Preparing to unpack .../apt-xapian-index_0.47ubuntu8.4_all.deb ...
Unpacking apt-xapian-index (0.47ubuntu8.4) over (0.47ubuntu13) ...
dpkg: warning: downgrading python3-lxml:amd64 from 4.3.3-1 to 3.5.0-1ubuntu0.1
Preparing to unpack .../python3-lxml_3.5.0-1ubuntu0.1_amd64.deb ...
Unpacking python3-lxml (3.5.0-1ubuntu0.1) over (4.3.3-1) ...
dpkg: warning: downgrading python3-pil:amd64 from 5.4.1-1 to 3.1.2-0ubuntu1.1
Preparing to unpack .../python3-pil_3.1.2-0ubuntu1.1_amd64.deb ...
Unpacking python3-pil:amd64 (3.1.2-0ubuntu1.1) over (5.4.1-1) ...
dpkg: warning: downgrading python3-brlapi:amd64 from 5.6-10ubuntu1 to 5.3.1-2ubuntu2.1
Preparing to unpack .../python3-brlapi_5.3.1-2ubuntu2.1_amd64.deb ...
Unpacking python3-brlapi (5.3.1-2ubuntu2.1) over (5.6-10ubuntu1) ...
dpkg: warning: downgrading python3-libapparmor from 2.13.2-9ubuntu6 to 2.10.95-0ubuntu2.11
Preparing to unpack .../python3-libapparmor_2.10.95-0ubuntu2.11_amd64.deb ...
Unpacking python3-libapparmor (2.10.95-0ubuntu2.11) over (2.13.2-9ubuntu6) ...
Setting up python3-pil:amd64 (3.1.2-0ubuntu1.1) ...
Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.5) ...
Setting up python3-lxml (3.5.0-1ubuntu0.1) ...
Setting up python3-brlapi (5.3.1-2ubuntu2.1) ...
Setting up python3-libapparmor (2.10.95-0ubuntu2.11) ...
Setting up libpsl5:amd64 (0.20.2-2) ...
Setting up uuid-dev:i386 (2.33.1-0.1ubuntu2) ...
Setting up apt-xapian-index (0.47ubuntu8.4) ...
Setting up libffi-dev:i386 (3.2.1-9) ...
Setting up cmake-data (3.13.4-1) ...
Setting up dwz (0.12-3) ...
Setting up libcomerr2:i386 (1.44.6-1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for dbus (1.10.6-1ubuntu3.4) ...
Processing triggers for libc-bin (2.29-0ubuntu2) ...

This worked like a charm! So I'm now ready to do
apt update;do-release-upgrade and it should work properly now?
Thank you very much Manfred!

Manfred Hampl (m-hampl) said : #27

Yes! the package management seems to be in a consistent status again. "apt" commands should work.
Nevertheless, you have to be aware that there might still be some packages from the wrong distribution that might interfere with installation of packages for your current release.
And I assume that your system believes that it is already on 19.04 level (see lsb_release -crid). This may cause problems when trying to do a release upgrade to e.g. 18.04

I suggest that you do some consistency checks before you start big package management activities:

What is now the output of

uname -a
lsb_release -crid
apt list --upgradable
ubuntu-support-status
ubuntu-support-status --show-unsupported

(if it says command not found for ubuntu-support-status, then install the package update-manager-core and try again.)

cerr (ron-eggler) said : #28

$ uname -a
Linux jpax-build07 4.15.0-54-generic #58~16.04.1-Ubuntu SMP Mon Jun 24 13:21:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ron@jpax-build07:~/tempwork$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
ron@jpax-build07:~/tempwork$ sudo apt list --upgradable
[sudo] password for ron:
Listing... Done
bind9-host/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
dnsutils/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
file-roller/xenial-updates,xenial-security 3.16.5-0ubuntu1.3 amd64 [upgradable from: 3.16.5-0ubuntu1.2]
firefox-locale-en/xenial-updates,xenial-security 69.0.1+build1-0ubuntu0.16.04.1 amd64 [upgradable from: 69.0+build2-0ubuntu0.16.04.4]
firefox/xenial-updates,xenial-security 69.0.1+build1-0ubuntu0.16.04.1 amd64 [upgradable from: 69.0+build2-0ubuntu0.16.04.4]
fonts-opensymbol/xenial-updates,xenial-updates,xenial-security,xenial-security 2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial10 all [upgradable from: 2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial9]
gir1.2-ibus-1.0/xenial-updates,xenial-security 1.5.11-1ubuntu2.3 amd64 [upgradable from: 1.5.11-1ubuntu2.1]
ibus-gtk3/xenial-updates,xenial-security 1.5.11-1ubuntu2.3 amd64 [upgradable from: 1.5.11-1ubuntu2.1]
ibus-gtk/xenial-updates,xenial-security 1.5.11-1ubuntu2.3 amd64 [upgradable from: 1.5.11-1ubuntu2.1]
ibus/xenial-updates,xenial-security 1.5.11-1ubuntu2.3 amd64 [upgradable from: 1.5.11-1ubuntu2.1]
libbind9-140/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libdns-export162/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libdns162/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libfdisk1/xenial-updates 2.27.1-6ubuntu3.8 amd64 [upgradable from: 2.27.1-6ubuntu3.7]
libibus-1.0-5/xenial-updates,xenial-security 1.5.11-1ubuntu2.3 amd64 [upgradable from: 1.5.11-1ubuntu2.1]
libisc-export160/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libisc160/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libisccc140/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libisccfg140/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libldap-2.4-2/xenial-updates 2.4.42+dfsg-2ubuntu3.7 amd64 [upgradable from: 2.4.42+dfsg-2ubuntu3.6]
libldap2-dev/xenial-updates 2.4.42+dfsg-2ubuntu3.7 amd64 [upgradable from: 2.4.42+dfsg-2ubuntu3.6]
liblwres141/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libreoffice-common/xenial-updates,xenial-updates,xenial-security,xenial-security 1:5.1.6~rc2-0ubuntu1~xenial10 all [upgradable from: 1:5.1.6~rc2-0ubuntu1~xenial9]
libreoffice-style-breeze/xenial-updates,xenial-updates,xenial-security,xenial-security 1:5.1.6~rc2-0ubuntu1~xenial10 all [upgradable from: 1:5.1.6~rc2-0ubuntu1~xenial9]
libreoffice-style-galaxy/xenial-updates,xenial-updates,xenial-security,xenial-security 1:5.1.6~rc2-0ubuntu1~xenial10 all [upgradable from: 1:5.1.6~rc2-0ubuntu1~xenial9]
libreoffice-style-oxygen/xenial-updates,xenial-updates,xenial-security,xenial-security 1:5.1.6~rc2-0ubuntu1~xenial10 all [upgradable from: 1:5.1.6~rc2-0ubuntu1~xenial9]
libreoffice-style-tango/xenial-updates,xenial-updates,xenial-security,xenial-security 1:5.1.6~rc2-0ubuntu1~xenial10 all [upgradable from: 1:5.1.6~rc2-0ubuntu1~xenial9]
libruby2.3/xenial-updates 2.3.1-2~ubuntu16.04.13 amd64 [upgradable from: 2.3.1-2~16.04.12]
libsmartcols1/xenial-updates 2.27.1-6ubuntu3.8 amd64 [upgradable from: 2.27.1-6ubuntu3.7]
libsnapd-glib1/xenial-updates 1.49-0ubuntu0.16.04.0 amd64 [upgradable from: 1.47-0ubuntu0.16.04.0]
libsnmp-base/xenial-updates,xenial-updates 5.7.3+dfsg-1ubuntu4.4 all [upgradable from: 5.7.3+dfsg-1ubuntu4.2]
libsnmp30/xenial-updates 5.7.3+dfsg-1ubuntu4.4 amd64 [upgradable from: 5.7.3+dfsg-1ubuntu4.2]
libwireshark-data/xenial-updates,xenial-updates,xenial-security,xenial-security 2.6.10-1~ubuntu16.04.0 all [upgradable from: 2.6.8-1~ubuntu16.04.0]
libwireshark11/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
libwiretap8/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
libwscodecs2/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
libwsutil9/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
linux-generic-hwe-16.04/xenial-updates,xenial-security 4.15.0.64.84 amd64 [upgradable from: 4.15.0.62.82]
linux-headers-generic-hwe-16.04/xenial-updates,xenial-security 4.15.0.64.84 amd64 [upgradable from: 4.15.0.62.82]
linux-image-generic-hwe-16.04/xenial-updates,xenial-security 4.15.0.64.84 amd64 [upgradable from: 4.15.0.62.82]
linux-libc-dev/xenial-updates,xenial-security 4.4.0-164.192 amd64 [upgradable from: 4.4.0-161.189]
linux-libc-dev/xenial-updates,xenial-security 4.4.0-164.192 i386 [upgradable from: 4.4.0-161.189]
mount/xenial-updates 2.27.1-6ubuntu3.8 amd64 [upgradable from: 2.27.1-6ubuntu3.7]
psmisc/xenial-updates 22.21-2.1ubuntu0.1 amd64 [upgradable from: 22.21-2.1build1]
ruby2.3/xenial-updates 2.3.1-2~ubuntu16.04.13 amd64 [upgradable from: 2.3.1-2~16.04.12]
snapd/xenial-updates 2.40 amd64 [upgradable from: 2.39.2ubuntu0.2]
ubuntu-core-launcher/xenial-updates 2.40 amd64 [upgradable from: 2.39.2ubuntu0.2]
uno-libs3/xenial-updates,xenial-security 5.1.6~rc2-0ubuntu1~xenial10 amd64 [upgradable from: 5.1.6~rc2-0ubuntu1~xenial9]
ure/xenial-updates,xenial-security 5.1.6~rc2-0ubuntu1~xenial10 amd64 [upgradable from: 5.1.6~rc2-0ubuntu1~xenial9]
util-linux/xenial-updates 2.27.1-6ubuntu3.8 amd64 [upgradable from: 2.27.1-6ubuntu3.7]
uuid-runtime/xenial-updates 2.27.1-6ubuntu3.8 amd64 [upgradable from: 2.27.1-6ubuntu3.7]
wireshark-common/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
wireshark-gtk/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
wireshark-qt/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
wireshark/xenial-updates,xenial-security 2.6.10-1~ubuntu16.04.0 amd64 [upgradable from: 2.6.8-1~ubuntu16.04.0]
wpasupplicant/xenial-updates,xenial-security 2.4-0ubuntu6.6 amd64 [upgradable from: 2.4-0ubuntu6.5]

I should be able to upgrade all these with no further issues, right? But why do they come from xenial-updates while it thinks it's on disco? Is this because my sources.list points to xenial? Should I change that to disco now?

Manfred Hampl (m-hampl) said : #29

The available packages come from the repositories listed in the sources.list. The output og lsb_release is not taken into account there.
I advise against changing the sources.list from xenial to dingo, but to try a regular release upgrade.

Can you please provide the output of

ubuntu-support-status
ubuntu-support-status --show-unsupported

cerr (ron-eggler) said : #30

Sorry, I missed these two before... here we go:
$ ubuntu-support-status
Support status summary of 'jpax-build07':

You have 29 packages (0.9%) supported until April 2024 (Community - 5y)
You have 18 packages (0.6%) supported until January 2020 (Community - 9m)
You have 2141 packages (68.0%) supported until April 2024 (Canonical - 5y)
You have 531 packages (16.9%) supported until April 2022 (Community - 3y)

You have 195 packages (6.2%) that can not/no longer be downloaded
You have 235 packages (7.5%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details

ron@jpax-build07:~/tempwork$ ubuntu-support-status --show-unsupported
Support status summary of 'jpax-build07':

You have 2141 packages (68.0%) supported until April 2024 (Canonical - 5y)
You have 29 packages (0.9%) supported until April 2024 (Community - 5y)
You have 531 packages (16.9%) supported until April 2022 (Community - 3y)
You have 18 packages (0.6%) supported until January 2020 (Community - 9m)

You have 195 packages (6.2%) that can not/no longer be downloaded
You have 235 packages (7.5%) that are unsupported

No longer downloadable:
apt apt-transport-https apt-utils aptitude aptitude-common autopoint
base-files bash bsdmainutils bsdutils cmake-data containerd.io
coreutils cpu-checker debianutils dh-python dkms docker-ce
docker-ce-cli dwz fontconfig-config gcc-9-base gcc-9-base:i386
gettext gpgv libapt-inst2.0 libapt-pkg5.0 libasprintf-dev
libasprintf0v5 libblkid1 libblkid1:i386 libboost-iostreams1.67.0
libbsd0 libbsd0:i386 libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev
libc6-dev-i386 libc6-dev-x32 libc6-dev:i386 libc6-i386 libc6-x32
libc6:i386 libcom-err2 libcom-err2:i386 libcomerr2 libcomerr2:i386
libcwidget3v5 libdb5.3 libepoxy0 libffi-dev libffi-dev:i386 libffi6
libffi6:i386 libfontconfig1 libfontconfig1:i386 libfreetype6
libfreetype6-dev:i386 libfreetype6:i386 libgcc1 libgcc1:i386
libgcrypt20 libgcrypt20-dev libgcrypt20:i386 libgettextpo-dev
libgettextpo0 libgnutls-openssl27 libgnutls30 libgnutls30:i386
libgpg-error-dev libgpg-error-l10n libgpg-error0 libgpg-error0:i386
libgssapi-krb5-2 libgssapi-krb5-2:i386 libhogweed4 libhogweed4:i386
libidn2-0 libidn2-0:i386 libimagequant0 libk5crypto3
libk5crypto3:i386 libkrb5-3 libkrb5-3:i386 libkrb5support0
libkrb5support0:i386 liblzma5 liblzma5:i386 libmount1 libmount1:i386
libncursesw6 libnettle6 libnettle6:i386 libnghttp2-14
libobasis6.0-base libobasis6.0-calc libobasis6.0-core
libobasis6.0-draw libobasis6.0-en-us
libobasis6.0-extension-beanshell-script-provider
libobasis6.0-extension-javascript-script-provider
libobasis6.0-extension-mediawiki-publisher
libobasis6.0-extension-nlpsolver libobasis6.0-extension-pdf-import
libobasis6.0-extension-report-builder libobasis6.0-firebird
libobasis6.0-gnome-integration libobasis6.0-graphicfilter
libobasis6.0-images libobasis6.0-impress libobasis6.0-kde-integration
libobasis6.0-librelogo libobasis6.0-math libobasis6.0-ogltrans
libobasis6.0-onlineupdate libobasis6.0-ooofonts
libobasis6.0-ooolinguistic libobasis6.0-postgresql-sdbc
libobasis6.0-python-script-provider libobasis6.0-pyuno
libobasis6.0-writer libobasis6.0-xsltfilter libp11-kit0
libp11-kit0:i386 libpng16-16 libpng16-16:i386 libpsl5 libpython3-dev
libpython3.7 libpython3.7-dev libpython3.7-minimal
libpython3.7-stdlib libreadline8 libreoffice6.0 libreoffice6.0-base
libreoffice6.0-calc libreoffice6.0-debian-menus
libreoffice6.0-dict-en libreoffice6.0-dict-es libreoffice6.0-dict-fr
libreoffice6.0-draw libreoffice6.0-en-us libreoffice6.0-impress
libreoffice6.0-math libreoffice6.0-ure libreoffice6.0-writer
libsdl1.2debian libselinux1 libselinux1:i386 libsigc++-2.0-0v5
libsqlite3-0 libsqlite3-0:i386 libssl1.1 libssl1.1:i386 libstdc++6
libstdc++6:i386 libtasn1-6 libtasn1-6:i386 libtinfo6 libunistring2
libunistring2:i386 libuuid1 libuuid1:i386 libvncserver1 libwebp6
libwebpdemux2 libwebpmux3 libxapian30 libzstd1 libzstd1:i386 locales
msr-tools p11-kit-modules python-apt python-apt-common
python-httplib2 python-xdg python3-asn1crypto python3-cryptography
python3-idna python3.7 python3.7-dev python3.7-minimal qemu uuid-dev
uuid-dev:i386 zlib1g zlib1g-dev zlib1g-dev:i386 zlib1g:i386 zsh
zsh-common zsync

Unsupported:
aglfn astyle aufs-tools autogen cabextract cgroupfs-mount clang
clang-3.8 colordiff cppcheck cppcheck-gui cscope debugedit dia
dia-common dia-libs dia-shapes dos2unix dsniff elinks elinks-data
gambas3-gb-qt5-webkit:i386 gambas3-gb-qt5:i386 gambas3-runtime:i386
gnuplot gnuplot-tex gnuplot5-data gnuplot5-qt gperf gsfonts-x11
haveged help2man htop inetutils-traceroute inotify-tools ipython
jarwrapper java-wrappers kdesrc-build kdiff3 kdiff3-doc
libapache-pom-java libatk-wrapper-java libatk-wrapper-java-jni
libautocomplete-java libavalon-framework-java libbatik-java
libboost-all-dev libboost-atomic-dev libboost-chrono-dev
libboost-context-dev libboost-context1.58-dev libboost-context1.58.0
libboost-coroutine-dev libboost-coroutine1.58-dev
libboost-coroutine1.58.0 libboost-date-time-dev
libboost-exception-dev libboost-exception1.58-dev
libboost-filesystem-dev libboost-filesystem1.58-dev
libboost-graph-dev libboost-graph-parallel-dev
libboost-graph-parallel1.58-dev libboost-graph-parallel1.58.0
libboost-graph1.58-dev libboost-graph1.58.0 libboost-iostreams-dev
libboost-iostreams1.58-dev libboost-locale-dev
libboost-locale1.58-dev libboost-log-dev libboost-log1.58-dev
libboost-log1.58.0 libboost-math-dev libboost-math1.58-dev
libboost-math1.58.0 libboost-mpi-dev libboost-mpi-python-dev
libboost-mpi-python1.58-dev libboost-mpi-python1.58.0
libboost-mpi1.58-dev libboost-mpi1.58.0 libboost-random-dev
libboost-random1.58-dev libboost-regex-dev libboost-regex1.58-dev
libboost-serialization-dev libboost-signals-dev
libboost-signals1.58-dev libboost-signals1.58.0 libboost-system-dev
libboost-test-dev libboost-test1.58-dev libboost-test1.58.0
libboost-timer-dev libboost-timer1.58-dev libboost-timer1.58.0
libboost-tools-dev libboost-wave-dev libboost-wave1.58-dev
libboost-wave1.58.0 libbsf-java libcapture-tiny-perl libclang-3.6-dev
libclang-common-3.6-dev libcommons-io-java libcommons-logging-java
libcommons-parent-java libconfig-simple-perl libfontbox-java
libfop-java libfsplib0 libgnuinet-java libgnumail-java libgsoap8
libhavege1 libhwloc-dev libhwloc-plugins libhwloc5 libinotifytools0
libitext5-java libjavaparser-java libjlibeps-java libjline-java
libjsyntaxpane-java liblog4j1.2-java libmaxminddb0 libmsgpack3
libnids1.21 libopenmpi-dev libopenmpi1.10 librhino-java librpm3
librpmbuild3 librpmio3 librpmsign3 librsyntaxtextarea-java
libsaxon-java libsvncpp3 libtext-unidecode-perl libtinyxml2-2v5
libtre5 libubuntu-application-api3 libubuntu-platform-hardware-api3
libuv1 libwireshark-data libwireshark11 libwiretap8 libwscodecs2
libwsutil9 libxmlgraphics-commons-java llvm llvm-runtime mc mc-data
meld mmv mpi-default-bin mpi-default-dev ncurses-hexedit nethogs
nodejs ofono openjdk-9-jdk-headless openjdk-9-jre
openjdk-9-jre-headless openmpi-bin openmpi-common pigz powerd
putty-tools pyqt4-dev-tools pyqt5-dev-tools python-dulwich
python-fastimport python-gtkglext1 python-lz4 python-lzo
python-nautilus python-opengl python-pexpect python-pip
python-pip-whl python-ptyprocess python-rencode python-rpm
python-software-properties python-sqlitecachec python-wheel
python3-pluggy python3-py python3-virtualenv qt5-default
rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus
rapidsvn rcs rhino rpm rpm-common rpm2cpio scons scsitools splint
splint-data ssh-askpass sshpass telepathy-ring texinfo tftp tlsdate
tmate tox ttf-mscorefonts-installer ubuntu-application-api3-test
ubuntu-release-upgrader-qt umlet virtualbox-dkms
virtualbox-guest-additions-iso virtualbox-guest-utils
virtualbox-guest-x11 virtualenv wireshark wireshark-common
wireshark-gtk wireshark-qt xfonts-100dpi xfonts-75dpi xpra xsel
yakuake yum

> but to try a regular release upgrade

is that the next step...?

Manfred Hampl (m-hampl) said : #31

ok, my summary:

The package management system is back is a consistent state, but there are still some packages from disco installed. This should not do harm, but might interfere with installation of additional packages or a release upgrade. Eventually showing problems can probably be solved easily.

The question now is: What do you want to do with your system? Do you want to stay on Ubuntu xenial release, or do you want to upgrade (either to bionic or to disco)?
It is your decision.

By the way, have you already executed "sudo apt update" (or "sudo apt dist-upgrade", or the same with apt-get)?
This should be the proof that the package management is healthy and that updates work again.

cerr (ron-eggler) said : #32

Okay, great!

Is I have tried apt update and even installed another package i required and that worked fine! Now as for going to bionic or disco, I would prefer bionic (due to LTS) but I'm wondering since you say "there are still some packages from disco installed" if it not might be lesser of a pain to go to disco instead of involving yet another version.

As for staying with Ubuntu: for the time being yes, I'm tied to it as there's some proprietary software that is cut ready to run on Ubuntu...

Best Manfred Hampl (m-hampl) said : #33

Maybe a misunderstanding caused by the line break:
I did not ask whether you want to stay on Ubuntu (I took that for granted), but my intention was to ask if you want to stay on Ubuntu xenial.

For the possible version conflicts when installing additional packages:
I guess that the following may happen:
"libnelle6" is listed as "No longer downloadable".
I assume that you currently have libnettle6 from disco installed on your system.
If you now need to install nettle-dev, then you will probably receive the message that nettle-dev (from xenial) and the currently installed libnettle6 (from disco) do not fit together.
Solution probably would be to downgrade libnettle6 to the version from xenial.

To avoid these problems you probably should do the relase upgrade to disco, unless there is the need to stay on Ubuntu xenial.

cerr (ron-eggler) said : #34

Thanks Manfred Hampl, that solved my question.