1

I have Ubuntu 22.04.5 LTS installed on my server and for a while now each time I run apt upgrade, 4 packages related to python (python3, python3-apt, python3-minimal, libpython3-stdlib) are shown as held back and shown as upgradable to a newer version:

The following packages have been kept back:
  libpython3-stdlib python3 python3-apt python3-minimal
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

(These are the repos apt update fetches):

Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 https://download.docker.com/linux/ubuntu jammy InRelease
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Hit:4 http://deb.volian.org/volian nala InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:6 http://archive.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2,511 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,200 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [296 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages [2,264 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [973 kB]

The packages also show up in apt list --upgradable output (I use nala so the output looks a little bit different):

libpython3-stdlib 3.10.6-1~22.04 [Ubuntu/jammy main]
├── is installed and upgradable to 3.10.6-1~22.04.1
└── interactive high-level object-oriented language (default python3 version)

python3 3.10.6-1~22.04 [Ubuntu/jammy main] ├── is installed and upgradable to 3.10.6-1~22.04.1 └── interactive high-level object-oriented language (default python3 version)

python3-apt 2.4.0ubuntu3 [local] ├── is installed and upgradable to 2.9.0+b1 └── Python 3 interface to libapt-pkg

python3-minimal 3.10.6-1~22.04 [Ubuntu/jammy main] ├── is installed and upgradable to 3.12.5-1 └── minimal subset of the Python language (default python3 version)

But when I try to manually install these using apt install, I get this output (nala actually crashed on this one so here is the regular apt output):

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: python3 : PreDepends: python3-minimal (= 3.10.6-1~22.04.1) but 3.12.5-1 is to be installed python3-apt : Depends: python3 (>= 3.12~) but 3.10.6-1~22.04.1 is to be installed Depends: libapt-pkg6.0t64 (>= 2.7.11) but it is not installable Depends: libstdc++6 (>= 13.1) but 12.3.0-1ubuntu1~22.04 is to be installed python3-minimal : PreDepends: python3.12-minimal (>= 3.12.4-1~) but it is not installable E: Unable to correct problems, you have held broken packages.

The problem (apart from annoying held packages popping up on each upgrade) is that the system doesn't let me do a release upgrade using do-release-upgrade because there are "available updates for your release":

Please install all available updates for your release before upgrading.

How can I fix this?

Online, I haven't been able to find anyone with the same problem, I just found people trying to upgrade their python version which I don't even want and as far as I understand isn't even possible because Ubuntu 22 relies on python 3.10.

To be honest, I don't even know how this happened, maybe I somehow confused the package manager into thinking it can install packages it actually can't so maybe the fix is to just somehow stop it from wanting to upgrade these?

Here is the output of apt policy python3 python3-apt python3-minimal libpython3-stdlib:

python3:
  Installed: 3.10.6-1~22.04
  Candidate: 3.10.6-1~22.04.1
  Version table:
     3.10.6-1~22.04.1 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
 *** 3.10.6-1~22.04 500
        500 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.10.4-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
python3-apt:
  Installed: 2.4.0ubuntu3
  Candidate: 2.9.0+b1
  Version table:
     2.9.0+b1 500
        500 http://deb.volian.org/volian nala/main amd64 Packages
     2.4.0ubuntu4 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
 *** 2.4.0ubuntu3 100
        100 /var/lib/dpkg/status
     2.3.0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
python3-minimal:
  Installed: 3.10.6-1~22.04
  Candidate: 3.12.5-1
  Version table:
     3.12.5-1 500
        500 http://deb.volian.org/volian nala/main amd64 Packages
     3.10.6-1~22.04.1 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
 *** 3.10.6-1~22.04 500
        500 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.10.4-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libpython3-stdlib:
  Installed: 3.10.6-1~22.04
  Candidate: 3.10.6-1~22.04.1
  Version table:
     3.10.6-1~22.04.1 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
 *** 3.10.6-1~22.04 500
        500 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.10.4-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
DevLung
  • 11
  • 2

0 Answers0