Cannot update - Errors no matter what I do

Hi. I’ve been using Neon for years now, and have it on nearly all of my systems.

I went to update my PC today, and something very strange happened. Discover bombed out:

Package failed to install:

Error while installing package: installed python3.10-minimal package post-installation script subprocess returned error exit status 132

So I moved to the next option: pkcon, that fails, then I move to apt, that fails, then I try to repair my package system a few different ways, and that fails. I’m blocked no matter what I do! I don’t have any weird repos or anything installed, everything is pretty standard. I don’t understand where this is coming from. I googled the heck out of this, but none of the suggestions I have found worked. Below is a transcript of some of the things I have tried to do.

root@xxxx-lin:/etc/apt/sources.list.d# pkcon refresh
Refreshing cache [=========================]
Loading cache [=========================]
Downloading update information [=========================]
Finished [=========================]
Fatal error: E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi’
E: Sub-process returned an error code

root@xxxx-lin:/etc/apt/sources.list.d# apt update
Ign:1 hxxp://pkg.tarsnap.com/deb/focal ./ InRelease
Hit:2 hxxp://pkg.tarsnap.com/deb/focal ./ Release
Hit:3 hxxp://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 hxxp://archive.ubuntu.com/ubuntu jammy InRelease
Hit:6 hxxp://archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:7 hxxp://archive.neon.kde.org/user jammy InRelease [189 kB]
Hit:8 hxxps://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy InRelease
Fetched 189 kB in 1s (190 kB/s)
Illegal instruction
Reading package lists… Done
E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi’
E: Sub-process returned an error code

root@xxxx-lin:/etc/apt/sources.list.d# apt --fix-broken install
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Correcting dependencies…Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following packages were automatically installed and are no longer required:
gconf-service gconf-service-backend gconf2 gconf2-common libappindicator1 libdbusmenu-gtk4
libgconf-2-4 libkf5dbusaddons-bin libkf5iconthemes-bin libkf5xmlgui-bin libphonon4qt5-data
linux-headers-5.15.0-87 linux-headers-5.15.0-87-generic linux-headers-6.2.0-33-generic
linux-hwe-6.2-headers-6.2.0-33 linux-image-5.15.0-87-generic linux-image-6.2.0-33-generic
linux-modules-5.15.0-87-generic linux-modules-6.2.0-33-generic
linux-modules-extra-5.15.0-87-generic linux-modules-extra-6.2.0-33-generic
qml-module-org-kde-runnermodel
Use ‘apt autoremove’ to remove them.
The following additional packages will be installed:
python3.10
Suggested packages:
python3.10-venv python3.10-doc
The following packages will be upgraded:
python3.10
1 upgraded, 0 newly installed, 0 to remove and 145 not upgraded.
42 not fully installed or removed.
Need to get 0 B/508 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3.10-minimal (3.10.12-1~22.04.3) …
Illegal instruction
dpkg: error processing package python3.10-minimal (–configure):
installed python3.10-minimal package post-installation script subprocess returned error exit status 132
Errors were encountered while processing:
python3.10-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@xxxx-lin:/etc/apt/sources.list.d# apt --fix-broken install
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Correcting dependencies…Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following packages were automatically installed and are no longer required:
gconf-service gconf-service-backend gconf2 gconf2-common libappindicator1 libdbusmenu-gtk4
libgconf-2-4 libkf5dbusaddons-bin libkf5iconthemes-bin libkf5xmlgui-bin libphonon4qt5-data
linux-headers-5.15.0-87 linux-headers-5.15.0-87-generic linux-headers-6.2.0-33-generic
linux-hwe-6.2-headers-6.2.0-33 linux-image-5.15.0-87-generic linux-image-6.2.0-33-generic
linux-modules-5.15.0-87-generic linux-modules-6.2.0-33-generic
linux-modules-extra-5.15.0-87-generic linux-modules-extra-6.2.0-33-generic
qml-module-org-kde-runnermodel
Use ‘apt autoremove’ to remove them.
The following additional packages will be installed:
python3.10
Suggested packages:
python3.10-venv python3.10-doc
The following packages will be upgraded:
python3.10
1 upgraded, 0 newly installed, 0 to remove and 145 not upgraded.
42 not fully installed or removed.
Need to get 0 B/508 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3.10-minimal (3.10.12-1~22.04.3) …
Illegal instruction
dpkg: error processing package python3.10-minimal (–configure):
installed python3.10-minimal package post-installation script subprocess returned error exit status 132
Errors were encountered while processing:
python3.10-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@xxxx-lin:/etc/apt/sources.list.d# sudo apt --fix-missing purge $(dpkg -l | grep ‘python3.1[01]’ | awk ‘{print $2}’)
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
blender : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
gdb : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
hplip : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
libnglib-6.2 : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
libobs0 : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
libpython3-dev : Depends: libpython3.10-dev (>= 3.10.6-1~) but it is not going to be installed
libpython3-stdlib : Depends: libpython3.10-stdlib (>= 3.10.6-1~) but it is not going to be installed
obs-studio : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
Depends: python3.10 but it is not going to be installed
plasma-firewall : Depends: python3.10 but it is not going to be installed
python3 : Depends: python3.10 (>= 3.10.6-1~) but it is not going to be installed
python3-dev : Depends: python3.10-dev (>= 3.10.6-1~) but it is not going to be installed
python3-ldb : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
python3-minimal : PreDepends: python3.10-minimal (>= 3.10.6-1~) but it is not going to be installed
python3-netgen : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
python3-numpy : Depends: python3.10:any
python3-pyqt5 : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
python3-samba : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
python3-talloc : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
python3-uno : Depends: python3.10 but it is not going to be installed
Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
samba : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
samba-libs : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
scribus : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
vim : Depends: libpython3.10 (>= 3.10.0) but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

Thank you for your help.

No takers, huh?

I guess then, what is the best recovery option here? I know when I used gentoo, they had a python/portage package you could download and unzip on your system just to get the package management tools up and running again. Is there anything like that? Or general rescue strategy for Neon?

Thanks.

That’s strange Illegal instruction

What kind of hardware is this machine, how old is it ?

You can try do download python3.10-minimal (it might be in /var/cache/apt/archives/) and manually install it using sudo dpkg -i python3.10-minimal it should give you a better error message.

Unfortunately, this does not work. The packages are not in the apt cache on any my systems (which seems strange, but it is true), so I cannot copy it over. I spent a long time picking through debian and ubuntu repositories, and I cannot find it there either. I found something close in the debian repos (in sid), but it was too modern, and did not help.

I couldn’t keep waiting on help, and I couldn’t afford the time it takes to keep tinkering. I had to go for a reinstall… PITA, but it seemed I was trapped in a chicken-and-egg situation. Not sure how that came about… hopefully there are no hardware issues on my PC (it is only a couple years old). I’ll be doing some smart testing and ram checking soon here…

I do not see why a reinstall was necessary a Google search on python3.10-minimal mentioned as the package to be installed in the error gave me this link as the first hit.

(Ubuntu – Package Search Results -- python3.10-minimal)

Which has the exact version needed (3.10.12-1~22.04.3) listed on the page.

Yes, I found that too, and gave that a shot. It was blocked at the next package, then then next until that one jammed me up as well.

It turns out that I had a memory module that had gone bad. It must have caused a crash or something at the wrong time that corrupted my python/apt.

I did the reinstall, still had problems, did the memtest, it failed, replaced the ram, now everything seems OK. I was surprised… it was good, very expensive ram, and it was only 2 years old. It can happen.

Thanks for the input.

You are welcome, computers got to love them. Yes it is strange the memory failing like that especially so new, good to see you got it sorted. Oh some brands have lifetime warranty check to see if yours can been replaced with new module as two years is well short of the expected period for it to last.