0

I updated a server from 18.04 LTS to 20.04 LTS today. Unfortunately I am facing two problems:

1. apt-get update && upgrade do not work.

   Machine returns a long list of "Depends" errors. Please, see below:

The following packages have unmet dependencies:
     debconf-i18n : Depends: debconf (= 1.5.73) but 1.5.66ubuntu1 is installed
     dirmngr : Depends: init-system-helpers (>= 1.52) but 1.51 is installed
     gir1.2-gtk-3.0 : Depends: gir1.2-gdkpixbuf-2.0 (>= 2.40.0) but 2.36.11-2 is installed
                      Depends: gir1.2-pango-1.0 (>= 1.41.0) but 1.40.14-1ubuntu0.1 is installed
                      Depends: libgtk-3-0 (>= 3.24.7) but 3.22.30-1ubuntu4 is installed
     gnupg : Depends: gpgv (>= 2.2.19-3ubuntu2.2)
     gpg-agent : Depends: init-system-helpers (>= 1.52) but 1.51 is installed
     mailutils : Depends: guile-2.2-libs but it is not installed
                 Depends: libmailutils6 but it is not installed
                 Depends: libncurses6 (>= 6) but it is not installed
     python3 : PreDepends: python3-minimal (= 3.6.7-1~18.04) but 3.8.2-0ubuntu2 is installed
               Depends: libpython3-stdlib (= 3.6.7-1~18.04) but 3.8.2-0ubuntu2 is installed
     python3-apt : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-cairo : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-cffi-backend : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-cheetah : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-crypto : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-dbus : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-dev : Depends: python3 (= 3.8.2-0ubuntu2) but 3.6.7-1~18.04 is installed
                   Depends: libpython3-dev (= 3.8.2-0ubuntu2) but 3.6.7-1~18.04 is installed
                   Depends: python3.8-dev (>= 3.8.2-1~) but it is not installed
     python3-distutils : Depends: python3:any (>= 3.8.2-0~)
     python3-geoip : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-gi : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
                  Depends: libgirepository-1.0-1 (>= 1.62.0-4~) but 1.56.1-1 is installed
     python3-gi-cairo : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-icu : Depends: libicu66 (>= 66.1~rc-1~) but it is not installed
                   Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-lib2to3 : Depends: python3:any (>= 3.8.2-0~)
     python3-libtorrent : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
                          Depends: libtorrent-rasterbar10 (= 1.2.16~daily10769+e0dd73971-202206291010~ubuntu20.04.1) but 1.2.16~daily10769+e0dd73971-202206291010~ubuntu18.04.1 is installed
     python3-markupsafe : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-netifaces : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-newt : Depends: libnewt0.52 (= 0.52.21-4ubuntu2) but 0.52.20-1ubuntu1 is installed
                    Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-pam : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-pil : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
                   Depends: libfreetype6 (>= 2.9.1) but 2.8.1-2ubuntu2.2 is installed
                   Depends: libimagequant0 (>= 2.11.10) but it is not installed
                   Depends: libwebpmux3 (>= 0.6.1-2ubuntu0.20.04.1) but 0.6.1-2ubuntu0.18.04.1 is installed
     python3-rencode : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-sabyenc : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-setproctitle : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-simplejson : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-systemd : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-twisted-bin : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-ujson : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-yaml : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-zope.hookable : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-zope.interface : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

2. Python is not working.

So far, I have tried the following:

1. apt --fix-broken install.

   These errors out with the following:

`Exception: python3.8 -c 'import imp; print(imp.get_tag())' failed with status code 139
dpkg: error processing package python3-minimal (--configure):
 installed python3-minimal package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)`

2. Tried to uninstall & fix Python.

   All I get is the above dependencies lists. I've also confirmed Python 3.6.9 is installed with python --version. I cannot update it.

3. I have used aptitude and it cannot fix any of the Python packages.

I would appreciate any help or suggestion.

Artur Meinild
  • 21,605
  • 21
  • 56
  • 89
dfunction
  • 1
  • 1
  • [Debugging Debian packages](http://mdcc.cx/debian/debugging_debian_package_installations.html) shows how to find out where exactly the problem is. Please check and update the question with more details. – Marco May 02 '23 at 06:50
  • Ubuntu 20.04 uses Python 3.8 It seems somehow you have the wrong version of python. Time to do a fresh install of the OS. It is dead. Messing with python kills the OS. You of course made a back up of the important data before starting a version upgrade. – David May 02 '23 at 07:03
  • Let's rephrase the issue: Your upgrade from 18.04 to 20.04 was only partially successful. You are still using your 18.04 version of Python3. Your apt logs will tell you what failed and why. However, that troubleshooting can be tedious. It may be faster and simpler for many users, as @David recommended, to backup your data and install fresh. – user535733 May 02 '23 at 10:42
  • Thanks. I suspected the OS may be dead. Yes I have my data backed up. Should I jump to a fresh Server 22.04 LTS install? Thanks again. – dfunction May 02 '23 at 13:47
  • Does this answer your question? [Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work](https://askubuntu.com/questions/384033/removed-python-3-and-now-ubuntu-software-center-terminal-and-other-applications) and[Restore default apt repositories in sources.list from command line](https://askubuntu.com/q/586595/) – karel May 05 '23 at 06:00

0 Answers0