1

I upgraded last night from Ubuntu 20.04 to 22.04. When I booted up my PC, I found my settings app (gnome-control-center) was gone. I tried to install, but I get:

$ sudo apt install gnome-control-center
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
 libpython3.10 : Depends: libpython3.10-stdlib (= 3.10.12-1~22.04.3) but 3.10.14-1+focal1 is to be installed
E: Unable to correct problems, you have held broken packages.

This problem has been reported twice here ((1), (2)), but none of the solutions work for me.

Based on the second question linked above, I tried sudo apt remove libpython3.10-stdlib, but I again get the same or a similar error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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 : Depends: python3.10 (>= 3.10.6-1~) but it is not going to be installed
           Depends: libpython3-stdlib (= 3.10.6-1~22.04) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I also followed the instructions here.


Contents of sources.list as requested:

# deb cdrom:[Ubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017)]/ eoan main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy main restricted
deb-src http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy multiverse restricted universe main #Added by software-properties
# deb-src http://fr.archive.ubuntu.com/ubuntu/ eoan main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-updates main restricted
deb-src http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-updates multiverse restricted universe main #Added by software-properties
# deb-src http://fr.archive.ubuntu.com/ubuntu/ eoan-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy universe
# deb-src http://fr.archive.ubuntu.com/ubuntu/ eoan universe
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-updates universe
# deb-src http://fr.archive.ubuntu.com/ubuntu/ eoan-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy multiverse
# deb-src http://fr.archive.ubuntu.com/ubuntu/ eoan multiverse
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-updates multiverse
# deb-src http://fr.archive.ubuntu.com/ubuntu/ eoan-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-backports main restricted universe multiverse #Added by software-properties
# deb-src http://fr.archive.ubuntu.com/ubuntu/ eoan-backports main restricted universe multiverse
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-security main restricted
deb-src http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-security multiverse restricted universe main #Added by software-properties
# deb-src http://security.ubuntu.com/ubuntu eoan-security main restricted
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu eoan-security universe
deb http://ubuntu-arch.linux.edu.lv/ubuntu/ jammy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu eoan-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# deb https://typora.io/linux ./ # disabled on upgrade to focal
# deb-src https://typora.io/linux ./
# see the sources.list(5) manual.
# deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable # disabled on upgrade to focal
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu eoan stable
# deb https://crawl.develz.org/debian crawl 0.24 # disabled on upgrade to focal
# deb https://crawl.develz.org/debian crawl 0.24 # disabled on upgrade to focal
# deb https://crawl.develz.org/debian crawl 0.24 # disabled on upgrade to focal
# deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main # disabled on upgrade to jammy
# deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main

Output of sudo apt-cache policy libpython3.10-stdlib

libpython3.10-stdlib:
  Installed: 3.10.14-1+focal1
  Candidate: 3.10.14-1+focal1
  Version table:
 *** 3.10.14-1+focal1 100
        100 /var/lib/dpkg/status
     3.10.12-1~22.04.3 500
        500 http://ubuntu-arch.linux.edu.lv/ubuntu jammy-updates/main amd64 Packages
        500 http://ubuntu-arch.linux.edu.lv/ubuntu jammy-security/main amd64 Packages
     3.10.4-3 500
        500 http://ubuntu-arch.linux.edu.lv/ubuntu jammy/main amd64 Packages
11
  • Can you please post the contents of /etc/apt/sources.list? Commented Jun 21 at 12:45
  • @ArchismanPanigrahi Sure
    – Jack M
    Commented Jun 21 at 12:46
  • The source of the problem is libpython3.10 : Depends: libpython3.10-stdlib (= 3.10.12-1~22.04.3) but 3.10.14-1+focal1 is to be installed. Somehow the focal version has higher version number than the jammy version, and there must be a focal repository somewhere inside /etc/apt/. Are any PPAs activated, e.g. the deadsnakes PPA? Commented Jun 21 at 12:49
  • @ArchismanPanigrahi When I run software-properties-gtk, every single source in the "Other software" tab is unchecked. I'm not sure if I can trust this front-end, though. Is there a config file I can check to be sure?
    – Jack M
    Commented Jun 21 at 12:51
  • 1
    I fixed this, I will post an answer soon
    – Jack M
    Commented Jun 21 at 15:02

1 Answer 1

1

This is the command that did it for me:

sudo apt install 'python3.10=3.10.12-1~22.04.3' 'python3.10-minimal=3.10.12-1~22.04.3' 'libpython3.10-stdlib=3.10.12-1~22.04.3' 'libpython3.10-minimal=3.10.12-1~22.04.3'

Essentially, you just start by trying to install the missing package at its specific version, libpython3.10-stdlib=3.10.12-1~22.04.3. APT will yell at you because that will break other packages, and it will tell you what those packages are, with more error messages like this:

 python3.10 : Depends: python3.10-minimal (= 3.10.12-1~22.04.3) but 3.10.14-1+focal1 is to be installed

Just take the thing after Depends and add it to the list of things to install in your commands, setting it to the requires version string. Basically, APT can't install just one package out of a tree of dependencies, since it will break other things in the tree. You have to track down every node in the tree and install them "all at once".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .