3

Updated to Ubuntu 22.04.1 from 20.04, and the Settings (aka gnome-control-center) is missing. Upon some searching, I found that I should do sudo apt install gnome-control-center. But when I tried that, the following output comes:

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.4-3ubuntu0.1) but 3.10.6-1+focal1 is to be installed E: Unable to correct problems, you have held broken packages.

Next, I tried sudo apt --fix-broken install. Output:

Building dependency tree... Done
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

sudo apt upgrade gives the following output:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libpeas-1.0-0
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

Next, I did sudo aptitude safe-upgrade. Output:

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

I opened aptitude by sudo aptitude. Under "Upgradable packages", there was 1 package. If I press g on that, I get the following screen:

enter image description here

I clicked on "OK" and then scrolled down to libpeas-1.0-0 to find:

enter image description here

If I click -, I get the following warning:

enter image description here

See that important applications like gedit will be removed if I remove this.

Now what am I supposed to do? How can I solve this error?

2 Answers2

1

This is how the problem was solved in my case. This is definitely not the best solution, and is available only if you had taken a backup of your system using TimeShift before upgrading. But this worked for me. That does not, however, mean that none of the other answers worked for me, and I can't comment on whether they work because I didn't have the opportunity to test them.

Soon after I posted the question, a comment by @user535733 made me remember that I had installed Python 3.10 from the deadsnakes PPA in Ubuntu 20.04. By that time, however, I had pressed g on the aptitude menu, and libpeas-1.0-0, along with many other applications like gedit, rythmbox etc. got uninstalled. I should also note that although in this question I have mentioned libpeas-1.0-0 as the only package being shown as "held back in its current state", the list also had gdb and obs-studio, which I had already uninstalled before posting the question.

Anyway, having uninstalled a bunch of important software, I had no option other than rolling back to Ubuntu 20.04. Fortunately, I had taken a TimeShift snapshot before upgrading (and I urge you, in case you are reading this before upgrading, to take a full snapshot of your system before starting the upgrade process), and using that, I could get back my old OS with all the applications in perfect state.

Next, I removed Python 3.10 from the system, purged its configuration files, and changed back the variables python and python3 to Python 3.8. Took another snapshot of the system, and re-started the upgrade. Once it was over, everything was fine and there were no broken packages. In fact, there was no issue with libpeas-1.0-0, gdb or obs-studio.

I will accept this answer as this is what worked for me, but I re-iterate that this is not the best solution, and its availability depends on whether you had taken a backup of your system using TimeShift.

Note that you should not just remove Python 3.10 from Ubuntu 22.04 using sudo apt remove python3.10 because that will take nearly everything with it, starting from gnome-shell.

0

Make sure to back up these files before doing this.

you need to manually edit dpkg status file

sudo gedit /var/lib/dpkg/status

Then look for the problematic package name. Remove those ubuntu 20.04 packages and save the file. deadsnakes supports jammy ppa also, so don't worry, Then update and upgrade.

sudo apt-get update && upgrade

Then it will install required packages during update. Let me know if this doesn't work out.

Zanna
  • 72,312