Score:0

Apt broken / broken dependencies / python3.9 libraries issues

in flag

I end up asking for help on this forum since I tried multiple approaches to solve my problem but I could'nt find any solution... So apparently I have unmet dependencies and when following apt advise, running apt --fix-broken install returns :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
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 229 not to upgrade.
3 not fully installed or removed.
Need to get 0 B/2 532 kB of archives.
After this operation, 490 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 477986 files and directories currently installed.)
Preparing to unpack .../libpython3.9-stdlib_3.9.5-3~20.04.1_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.5-3~20.04.1) over (3.9.2-1+bionic2) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.9-stdlib_3.9.5-3~20.04.1_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.2-1+bionic2
Preparing to unpack .../libpython3.9-minimal_3.9.5-3~20.04.1_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.5-3~20.04.1) over (3.9.2-1+bionic2) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.9-minimal_3.9.5-3~20.04.1_amd64.deb
 (--unpack):
 trying to overwrite '/usr/lib/python3.9/typing.py', which is also in package libpython3.9-stdlib:amd
64 3.9.2-1+bionic2
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.5-3~20.04.1_amd64.deb
 /var/cache/apt/archives/libpython3.9-minimal_3.9.5-3~20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Basically, I can't use apt anymore since I get similar error message every time. dpkg also gives me dependency errors.

I tried to reinstall Python with source code but got related errors... It appears I'm stuck.

I'd be really thankful for your help <3

ru flag
Which Ubuntu are you on? The Python versino you've installed looks like it's from a PPA, and that is VERY likely to break things
raj avatar
cn flag
raj
Are you trying to change the default Python version on Ubuntu? Never do that, because the whole Ubuntu system is heavily dependent on Python and by changing default Python version you will probably break the system. If you need another Python version, install it completely separately and independently from "system" Python.
CésarD avatar
in flag
My Ubuntu is Ubuntu 20.04.2 LTS
CésarD avatar
in flag
I installed Python3.9 by namely after adding deadsnakes ppa but I guess it is the most common method to do it with apt right? Now I know Ubuntu depends a lot on Python but I don't understand how I got these conflicts.
CésarD avatar
in flag
@raj No, actually I probably did bad handling before, but here and I just wanted to use apt, which I couldn't... so no mure update, no more install, which is a problem ^^. In the end I ended up upgrading to Ubtuntu 21.04 which fixed the problem, but I really could'nt solve this.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.