Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1045  / 2 Years ago, sun, may 1, 2022, 8:47:13

I have problems updating my Ubuntu 20.04. When I click on "update software". I got this message:


enter image description here


I followed the answer here: dpkg error: "trying to overwrite file, which is also in..."


I tried sudo dpkg -P python3.10 and I got:


(Reading database ... 256018 files and directories currently installed.)
Removing python3.10 (3.10.4-1+focal2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...


Then I try sudo apt --fix-broken install and I got


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:
libfwupdplugin1 libpython3.10-minimal libpython3.10-stdlib
python3.10-minimal
Use 'sudo apt autoremove' to remove them.
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 89 not upgraded.
6 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 ... 256000 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.1
0.4-1+focal2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.10/typing.py', which is also in package l
ibpython3.10-stdlib:amd64 3.10.4-1+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)

How can I fix this problem please?


More From » 20.04

 Answers
7

Many others observed similar problems, see below.
There are several posted answers, I would refer you to Sub-process /usr/bin/dpkg returned an error code (1) while upgrading python3.10, which is very recent, and evidently has quickly reached (and helped) a lot of users.


You have to do some manual work like this.
Slight variations might be required, please check references and post feedback.



  1. Remove packages with sudo apt remove libpython3.10-minimal libpython3.10-stdlib

  2. Move packages info with sudo mv /var/lib/dpkg/info/libpython3.10-stdlib:amd64.* /tmp (you could check the presence with ls -l /var/lib/dpkg/info | grep -i libpython3.10-stdlib). Likewise for libpython3.10-minimal.

  3. Reinstall with sudo apt --fix-broken install.


Related:



  1. https://stackoverflow.com/questions/71871921/no-way-to-update-python3-10-on-my-linux-mint-mate-20-3-una

  2. https://bugs.launchpad.net/ubuntu/+source/python3.9/+bug/1969191

  3. https://forum.zorin.com/t/python-dependency-errors/17812

  4. https://discuss.python.org/t/stuck-upgrading-parts-of-3-10-from-3-10-3-to-3-10-4/15183

  5. https://serveanswer.com/questions/unmet-dependencies-when-installing-pyqt5-on-ubuntu


[#508] Monday, May 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
llianconclad

Total Points: 65
Total Questions: 109
Total Answers: 127

Location: Mali
Member since Fri, Dec 3, 2021
2 Years ago
;