This is a fresh install of Ubuntu 24.04. This has happened now on 2 separate servers. Both servers were up and running for a few days and had multiple successful apt update, apt upgrade sessions.
First server experienced the error yesterday during apt upgrade:
Preparing to unpack .../python3_3.12.3-0ubuntu2_amd64.deb ...
running python pre-rtupdate hooks for python3.12...
dpkg: error processing archive /var/cache/apt/archives/python3_3.12.3-0ubuntu2_amd64.deb (--unpack):
new python3 package pre-installation script subprocess returned error exit status 3
Preparing to unpack .../libpython3-stdlib_3.12.3-0ubuntu2_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.12.3-0ubuntu2) over (3.12.3-0ubuntu1) ...
Preparing to unpack .../libsmartcols1_2.39.3-9ubuntu6.1_amd64.deb ...
Unpacking libsmartcols1:amd64 (2.39.3-9ubuntu6.1) over (2.39.3-9ubuntu6) ...
Errors were encountered while processing:
/var/cache/apt/archives/python3_3.12.3-0ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)***
If I try to run apt upgrade after the error I get this:
sudo apt upgrade
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:
python3 : PreDepends: python3-minimal (= 3.12.3-0ubuntu1) but 3.12.3-0ubuntu2 is installed
Depends: libpython3-stdlib (= 3.12.3-0ubuntu1) but 3.12.3-0ubuntu2 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I was unable to fix this and decided to re-install 24.04 from scratch.
Second server experienced the exact same crash this afternoon.
Anyone have any ideas on how to fix this and or prevent it from happening again?
sudo apt autoclean returns:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
sudo apt clean gives no output
sudo apt update shows 23 packages to be updated
sudo apt -f install ends with an error:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
python3
Suggested packages:
python3-doc python3-tk python3-venv
The following packages will be upgraded:
python3
1 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
2 not fully installed or removed.
Need to get 23.0 kB of archives.
After this operation, 1,024 B disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu noble-updates/main amd64 python3 amd64 3.12.3-0ubuntu2 [23.0 kB]
Fetched 23.0 kB in 0s (184 kB/s)
(Reading database ... 218408 files and directories currently installed.)
Preparing to unpack .../python3_3.12.3-0ubuntu2_amd64.deb ...
running python pre-rtupdate hooks for python3.12...
dpkg: error processing archive /var/cache/apt/archives/python3_3.12.3-0ubuntu2_amd64.deb (--unpack):
new python3 package pre-installation script subprocess returned error exit status 3
Errors were encountered while processing:
/var/cache/apt/archives/python3_3.12.3-0ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt install --reinstall python3-minimal libpython3-stdlib python3 ends with an error:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
python3-doc python3-tk python3-venv
The following packages will be upgraded:
python3
1 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 22 not upgraded.
2 not fully installed or removed.
Need to get 27.4 kB/50.4 kB of archives.
After this operation, 1,024 B disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-minimal amd64 3.12.3-0ubuntu2 [27.4 kB]
Fetched 27.4 kB in 1s (47.6 kB/s)
E: Internal Error, No file name for libpython3-stdlib:amd64