0

I ran sudo apt update and then I ran sudo apt upgrade with this result:

(.default) saul@linuxBox:~$ sudo apt upgrade
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.10 : Depends: libpython3.10-stdlib (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
 libpython3.10-dev : Depends: libpython3.10-stdlib (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
 python3.10 : Depends: libpython3.10-stdlib (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
 python3.10-minimal : Depends: libpython3.10-minimal (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I tried the suggestion:

(.default) saul@linuxBox:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libpython3.10-minimal libpython3.10-stdlib
The following packages will be upgraded:
  libpython3.10-minimal libpython3.10-stdlib
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
18 not fully installed or removed.
Need to get 0 B/2,566 kB of archives.
After this operation, 68.6 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 220160 files and directories currently installed.)
Preparing to unpack .../libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-stdlib:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/python3.10/_sysconfigdata__linux_x86_64-linux-gnu.py', which is also in package libpython3.10-minimal:amd64 3.10.4-1
+focal1
Preparing to unpack .../libpython3.10-minimal_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.10-minimal_3.10.4-1+focal2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/python3.10/typing.py', which is also in package libpython3.10-stdlib:amd64 3.10.4-1+`enter code here`focal1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb
 /var/cache/apt/archives/libpython3.10-minimal_3.10.4-1+focal2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

As suggested in the accepted answer here if first ran sudo apt autoclean and then tried sudo apt --fix-broken again, but I got the same results. So as it says in the link, I ran sudo dpkg --configure -a which gave me a large amount of output ending in

Errors were encountered while processing:
 libpython3.10:amd64
 python3.10
 python3.10-minimal
 python3.10-tk:amd64
 libpython3.10-dev:amd64
 python3.10-dev
 python3.10-venv

The link doesn't suggest what to do in this case, and I'm at a loss. I've accidentally used sudo pip install instead of pip install a couple of times and gotten a warning after the command ran. What can I do to fix this?

In case it matters, here's the entire output from sudo dpkg --configure -a:

    (.default) saul@linuxBox:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of libpython3.10:amd64:
 libpython3.10:amd64 depends on libpython3.10-stdlib (= 3.10.4-1+focal2); however:
  Version of libpython3.10-stdlib:amd64 on system is 3.10.4-1+focal1.

dpkg: error processing package libpython3.10:amd64 (--configure): dependency problems - leaving unconfigured Setting up systemd-sysv (245.4-4ubuntu3.16) ... dpkg: dependency problems prevent configuration of python3.10: python3.10 depends on libpython3.10-stdlib (= 3.10.4-1+focal2); however: Version of libpython3.10-stdlib:amd64 on system is 3.10.4-1+focal1.

dpkg: error processing package python3.10 (--configure): dependency problems - leaving unconfigured Setting up python3-problem-report (2.20.11-0ubuntu27.23) ... Setting up python3.10-lib2to3 (3.10.4-1+focal2) ... Setting up libnss-systemd:amd64 (245.4-4ubuntu3.16) ... dpkg: dependency problems prevent configuration of python3.10-minimal: python3.10-minimal depends on libpython3.10-minimal (= 3.10.4-1+focal2); however: Version of libpython3.10-minimal:amd64 on system is 3.10.4-1+focal1.

dpkg: error processing package python3.10-minimal (--configure): dependency problems - leaving unconfigured Setting up python3-apport (2.20.11-0ubuntu27.23) ... dpkg: dependency problems prevent configuration of python3.10-tk:amd64: python3.10-tk:amd64 depends on python3.10; however: Package python3.10 is not configured yet.

dpkg: error processing package python3.10-tk:amd64 (--configure): dependency problems - leaving unconfigured Setting up udev (245.4-4ubuntu3.16) ... update-initramfs: deferring update (trigger activated) dpkg: dependency problems prevent configuration of libpython3.10-dev:amd64: libpython3.10-dev:amd64 depends on libpython3.10-stdlib (= 3.10.4-1+focal2); however: Version of libpython3.10-stdlib:amd64 on system is 3.10.4-1+focal1. libpython3.10-dev:amd64 depends on libpython3.10 (= 3.10.4-1+focal2); however: Package libpython3.10:amd64 is not configured yet.

dpkg: error processing package libpython3.10-dev:amd64 (--configure): dependency problems - leaving unconfigured Setting up python3.10-distutils (3.10.4-1+focal2) ... dpkg: dependency problems prevent configuration of python3.10-dev: python3.10-dev depends on python3.10 (= 3.10.4-1+focal2); however: Package python3.10 is not configured yet. python3.10-dev depends on libpython3.10-dev (= 3.10.4-1+focal2); however: Package libpython3.10-dev:amd64 is not configured yet. python3.10-dev depends on libpython3.10 (= 3.10.4-1+focal2); however: Package libpython3.10:amd64 is not configured yet.

dpkg: error processing package python3.10-dev (--configure): dependency problems - leaving unconfigured Setting up brave-browser (1.37.116) ... Setting up libpam-systemd:amd64 (245.4-4ubuntu3.16) ... dpkg: dependency problems prevent configuration of python3.10-venv: python3.10-venv depends on python3.10 (= 3.10.4-1+focal2); however: Package python3.10 is not configured yet.

dpkg: error processing package python3.10-venv (--configure): dependency problems - leaving unconfigured Setting up apport (2.20.11-0ubuntu27.23) ... apport-autoreport.service is a disabled or a static unit, not starting it. Setting up apport-gtk (2.20.11-0ubuntu27.23) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for libc-bin (2.31-0ubuntu9.7) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for dbus (1.12.16-2ubuntu2.1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... Processing triggers for initramfs-tools (0.136ubuntu6.7) ... update-initramfs: Generating /boot/initrd.img-5.13.0-39-generic Errors were encountered while processing: libpython3.10:amd64 python3.10 python3.10-minimal python3.10-tk:amd64 libpython3.10-dev:amd64 python3.10-dev python3.10-venv

saulspatz
  • 239

0 Answers0