Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 1441  / 1 Year ago, mon, november 28, 2022, 1:40:34

I am getting an error for upgrading Ubuntu packages, it suggested running apt --fix-broken install but doing that didn't do it. I searched and the only answer I found was removing the packages which I am reluctant to do, cause I might mess it up.


I installed python3.10 some months ago, and my projects depend on it.



  • sudo apt-get upgrade


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).


  • Running sudo apt --fix-broken install


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-minima
l: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+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)

More From » apt

 Answers
4

Check out this solution.
https://github.com/deadsnakes/issues/issues/207
Specifically https://github.com/deadsnakes/issues/issues/207#issuecomment-1098684655 helped me


sudo apt purge libpython3.10-minimal libpython3.10-stdlib libpython3.10 libpython3.10-dev python3.10 python3.10-minimal python3.10-dev python3.10-venv
sudo apt install python3.10

[#668] Monday, November 28, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
riffnkful

Total Points: 390
Total Questions: 123
Total Answers: 110

Location: Puerto Rico
Member since Sat, Mar 13, 2021
3 Years ago
riffnkful questions
;