I am running Ubuntu 18.04.6 LTS. I cannot use sudo apt install anything The error I get is:
[sudo] password for username:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
libpython3.9 : Depends: libpython3.9-stdlib (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed
libpython3.9-dev : Depends: libpython3.9-stdlib (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed
python3.9 : Depends: libpython3.9-stdlib (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed
python3.9-minimal : Depends: libpython3.9-minimal (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
So I try: apt --fix-broken install
and I get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libllvm7 libllvm9 linux-headers-5.4.0-73-generic linux-hwe-5.4-headers-5.4.0-73 linux-image-5.4.0-73-generic
linux-modules-5.4.0-73-generic linux-modules-extra-5.4.0-73-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libpython3.9-minimal libpython3.9-stdlib
The following packages will be upgraded:
libpython3.9-minimal libpython3.9-stdlib
2 to upgrade, 0 to newly install, 0 to remove and 152 not to upgrade.
6 not fully installed or removed.
Need to get 0 B/2,486 kB of archives.
After this operation, 73.7 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 214069 files and directories currently installed.)
Preparing to unpack .../libpython3.9-stdlib_3.9.16-1+bionic1_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.16-1+bionic1) over (3.9.5-1+bionic1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.9-stdlib_3.9.16-1+bionic1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.9/_sysconfigdata__linux_x86_64-linux-gnu.py', which is also in package libpython3.9-minimal:amd64 3.9.5-1+bionic1
Preparing to unpack .../libpython3.9-minimal_3.9.16-1+bionic1_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.16-1+bionic1) over (3.9.5-1+bionic1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.9-minimal_3.9.16-1+bionic1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.9/typing.py', which is also in package libpython3.9-stdlib:amd64 3.9.5-1+bionic1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libpython3.9-stdlib_3.9.16-1+bionic1_amd64.deb
/var/cache/apt/archives/libpython3.9-minimal_3.9.16-1+bionic1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have also tried the "Software Updater" and it also reports an error suggesting I try: sudo apt-get install -f
This also fails with the same (Broken pipe) error as above.
I seem to be going around in circles. Does anyone have any suggestion as to what I can do next?
libpython3.9-minimal
first. – Jos Dec 29 '22 at 13:24sudo apt remove libpython3.9-minimal
. However, if that command replies with a suggestion to remove much else besides this one package, then don't press "y", or you might make things worse. – Jos Dec 29 '22 at 14:49