Unmet dependencies python3.9

13,753

Solution 1

This worked for me. I found the packages that errored out and installed them using dpkg:

sudo dpkg -i --force-all /var/cache/apt/archives/libpython3.9-stdlib_3.9.12-1+bionic2_amd64.deb
sudo dpkg -i --force-all /var/cache/apt/archives/libpython3.9-minimal_3.9.12-1+bionic2_amd64.deb

Note: You may have a different version of these packages which can be found using ls /var/cache/apt/archives/ | grep libpython3.9-

Then I could update:

sudo apt-get update -y && sudo apt-get install --fix-broken

Solution 2

You have unnecessary PPA repository added. To remove it use commands below:

# sudo apt-get install ppa-purge
cd ~/Downloads
apt-get download ppa-purge
dpkg -x ppa-purge_0.2.8+bzr63_all.deb ppap
sudo cp ppap/usr/sbin/ppa-purge /usr/local/bin/

sudo ppa-purge ppa:deadsnakes/ppa # first for bionic
sudo ppa-purge ppa:deadsnakes/ppa # second for focal

and then reinstall normal python versions from official 20.04 LTS repositories:

sudo apt-get install python3.9=3.9.5-3~20.04.1 libpython3.9-stdlib=3.9.5-3~20.04.1 \
libpython3.9-minimal=3.9.5-3~20.04.1 python3.9-minimal=3.9.5-3~20.04.1 --reinstall

Then install Aptitude with

sudo apt-get install aptitude

and resume package installation by

sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository restricted

sudo apt-get update
sudo apt-get install -f
sudo dpkg -i --force-all /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

sudo dpkg --configure -a
sudo aptitude install python3.9=3.9.5-3~20.04.1 libpython3.9-stdlib=3.9.5-3~20.04.1 \
libpython3.9-minimal=3.9.5-3~20.04.1 python3.9-minimal=3.9.5-3~20.04.1
sudo aptitude dist-upgrade

Solution 3

This article helped me dpkg error code 1

sudo dpkg --configure -a
sudo apt remove --purge python3.9-minimal python3.9
sudo apt autoremove
sudo apt upgrade
Share:
13,753

Related videos on Youtube

THeUNderstudy
Author by

THeUNderstudy

Updated on September 18, 2022

Comments

  • THeUNderstudy
    THeUNderstudy over 1 year

    I am trying to update Ubuntu and correct some system settings, however I am facing an issue I have been stuck on for over a week now.

    When I type sudo apt-get install, I get:

    The following packages have unmet dependencies.
     python3.9 : Depends: libpython3.9-stdlib (= 3.9.5-3~20.04.1) but 3.9.5-1+bionic1 is installed
     python3.9-minimal : Depends: libpython3.9-minimal (= 3.9.5-3~20.04.1) but 3.9.5-1+bionic1 is installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    

    So I run sudo apt --fix-broken install and get:

    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 33 not to upgrade.
    2 not fully installed or removed.
    Need to get 0 B/2,532 kB of archives.
    After this operation, 483 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 200853 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.5-1+bionic1) ...
    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.5-1+bionic1
    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.5-1+bionic1) ...
    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: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.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)
    

    I have tried a few things and searched for the errors in a few forums and I cant find a solution. It's really puzzling me.

    I have even tried removing:

    $ sudo apt remove libpython3.9-minimal/bionic libpython3.9-stdlib/bionic python3.9-minimal/focal-updates
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Selected version '3.9.5-1+bionic1' (New Python Versions:18.04/bionic [amd64]) for 'libpython3.9-minimal'
    Selected version '3.9.5-1+bionic1' (New Python Versions:18.04/bionic [amd64]) for 'libpython3.9-stdlib'
    Selected version '3.9.5-3~20.04.1' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'python3.9-minimal'
    Selected version '3.9.5-3~20.04.1' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'libpython3.9-minimal' because of 'python3.9-minimal'
    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies.
     python3.9 : Depends: python3.9-minimal (= 3.9.5-3~20.04.1) but it is not going to be installed
                 Depends: libpython3.9-stdlib (= 3.9.5-3~20.04.1) but it is not going to be installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    

    Any help would be great!

    Added the followingg

    $ apt-cache policy python3.9 libpython3.9-stdlib libpython3.9-minimal python3.9-minimal 
    
    Installed: 3.9.5-3~20.04.1
      Candidate: 3.9.5-3~20.04.1
      Version table:
     *** 3.9.5-3~20.04.1 500
            500 ://gb.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
            500 ://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
            100 /var/lib/dpkg/status
         3.9.5-1+focal1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
         3.9.5-1+bionic1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic/main amd64 Packages
    libpython3.9-stdlib:
      Installed: 3.9.5-1+bionic1
      Candidate: 3.9.5-3~20.04.1
      Version table:
         3.9.5-3~20.04.1 500
            500 ://gb.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
            500 ://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
         3.9.5-1+focal1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
     *** 3.9.5-1+bionic1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic/main amd64 Packages
            100 /var/lib/dpkg/status
    libpython3.9-minimal:
      Installed: 3.9.5-1+bionic1
      Candidate: 3.9.5-3~20.04.1
      Version table:
         3.9.5-3~20.04.1 500
            500 ://gb.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
            500 ://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
         3.9.5-1+focal1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
     *** 3.9.5-1+bionic1 500
            500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic/main amd64 Packages
            100 /var/lib/dpkg/status
    libpython3.9-minimal:
      Installed: 3.9.5-1+bionic1
      Candidate: 3.9.5-3~20.04.1
      Version table:
         3.9.5-3~20.04.1 500
            500 ://gb.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
            500 ://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
         3.9.5-1+focal1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
     *** 3.9.5-1+bionic1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic/main amd64 Packages
            100 /var/lib/dpkg/status
    python3.9-minimal:
      Installed: 3.9.5-3~20.04.1
      Candidate: 3.9.5-3~20.04.1
      Version table:
     *** 3.9.5-3~20.04.1 500
            500 ://gb.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
            500 ://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
            100 /var/lib/dpkg/status
         3.9.5-1+focal1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
         3.9.5-1+bionic1 500
            500 ://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic/main amd64 Packages
    

    I ran

    ~/Downloads$ sudo ppa-purge ppa:deadsnakes/ppa # first for bionic
    

    and this was a result

    sudo ppa-purge ppa:deadsnakes/ppa # first for bionic
    Updating packages lists
    PPA to be removed: deadsnakes ppa
    Package revert list generated:
     libpython3.8:amd64/focal libpython3.8-minimal:amd64/focal libpython3.8-stdlib:amd64/focal 
    libpython3.9-minimal:amd64/focal libpython3.9-stdlib:amd64/focal python3.8/focal python3.8-minimal/focal
    

    then the following:

    understudy@understudy-System-Product-Name:~/Downloads$ sudo ppa-purge ppa:deadsnakes/ppa # second for focal
    Updating packages lists
    PPA to be removed: deadsnakes ppa
    Warning:  Could not find package list for PPA: deadsnakes ppa
    understudy@understudy-System-Product-Name:~/Downloads$ sudo ppa-purge ppa:deadsnakes/ppa # first for bionic
    Updating packages lists
    PPA to be removed: deadsnakes ppa
    Warning:  Could not find package list for PPA: deadsnakes ppa
    
    understudy@understudy-System-Product-Name:~/Downloads$ sudo apt-get install python3.9=3.9.5-3~20.04.1 libpython3.9-stdlib=3.9.5-3~20.04.1 \
    > libpython3.9-minimal=3.9.5-3~20.04.1 python3.9-minimal=3.9.5-3~20.04.1 --reinstall
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      libffi6 libncursesw5 libreadline7 libtinfo5
    Use 'sudo apt autoremove' to remove them.
    The following packages will be upgraded:
      libpython3.9-minimal libpython3.9-stdlib
    2 to upgrade, 0 to newly install, 2 reinstalled, 0 to remove and 36 not to upgrade.
    7 not fully installed or removed.
    Need to get 0 B/2,532 kB of archives.
    After this operation, 483 kB of additional disk space will be used.
    E: Internal Error, No file name for python3.9-minimal:amd64
    

    still seems to not like it

    Disabling deadsnakes PPA from /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-focal.list
    Disabling deadsnakes PPA from /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-bionic.list
    Updating packages lists
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Selected version '3.8.5-1~20.04.3' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'libpython3.8'
    Selected version '3.8.5-1~20.04.3' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'libpython3.8-minimal'
    Selected version '3.8.5-1~20.04.3' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'libpython3.8-stdlib'
    Selected version '3.9.5-3~20.04.1' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'libpython3.9-minimal'
    Selected version '3.9.5-3~20.04.1' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'libpython3.9-stdlib'
    Selected version '3.8.5-1~20.04.3' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'python3.8'
    Selected version '3.8.5-1~20.04.3' (Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]) for 'python3.8-minimal'
    The following packages were automatically installed and are no longer required:
      libffi6 libncursesw5 libreadline7 libtinfo5
    Use 'sudo apt autoremove' to remove them.
    Suggested packages:
      python3.8-venv python3.8-doc
    The following packages will be upgraded:
      libpython3.9-minimal libpython3.9-stdlib
    The following packages will be DOWNGRADED:
      libpython3.8 libpython3.8-minimal libpython3.8-stdlib python3.8 python3.8-minimal
    2 to upgrade, 0 to newly install, 5 to downgrade, 0 to remove and 36 not to upgrade.
    2 not fully installed or removed.
    Need to get 6,280 kB/8,813 kB of archives.
    After this operation, 1,083 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8 amd64 3.8.5-1~20.04.3 [1,624 kB]
    Get:2 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8 amd64 3.8.5-1~20.04.3 [373 kB]
    Get:3 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-stdlib amd64 3.8.5-1~20.04.3 [1,671 kB]
    Get:4 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8-minimal amd64 3.8.5-1~20.04.3 [1,897 kB]
    Get:5 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-minimal amd64 3.8.5-1~20.04.3 [715 kB]
    Fetched 6,280 kB in 6s (969 kB/s)                                                                                      
    (Reading database ... 200853 files and directories currently installed.)
    Preparing to unpack .../0-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.5-1+bionic1) ...
    dpkg: error processing archive /tmp/apt-dpkg-install-vTH1pX/0-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.5-1+bionic1
    Preparing to unpack .../1-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.5-1+bionic1) ...
    dpkg: error processing archive /tmp/apt-dpkg-install-vTH1pX/1-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:amd64 3.9.5-1+bionic1
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    dpkg: warning: downgrading libpython3.8:amd64 from 3.8.10-1+bionic1 to 3.8.5-1~20.04.3
    Preparing to unpack .../2-libpython3.8_3.8.5-1~20.04.3_amd64.deb ...
    Unpacking libpython3.8:amd64 (3.8.5-1~20.04.3) over (3.8.10-1+bionic1) ...
    dpkg: warning: downgrading python3.8 from 3.8.10-1+bionic1 to 3.8.5-1~20.04.3
    Preparing to unpack .../3-python3.8_3.8.5-1~20.04.3_amd64.deb ...
    Unpacking python3.8 (3.8.5-1~20.04.3) over (3.8.10-1+bionic1) ...
    dpkg: warning: downgrading libpython3.8-stdlib:amd64 from 3.8.10-1+bionic1 to 3.8.5-1~20.04.3
    Preparing to unpack .../4-libpython3.8-stdlib_3.8.5-1~20.04.3_amd64.deb ...
    Unpacking libpython3.8-stdlib:amd64 (3.8.5-1~20.04.3) over (3.8.10-1+bionic1) ...
    dpkg: warning: downgrading python3.8-minimal from 3.8.10-1+bionic1 to 3.8.5-1~20.04.3
    Preparing to unpack .../5-python3.8-minimal_3.8.5-1~20.04.3_amd64.deb ...
    Unpacking python3.8-minimal (3.8.5-1~20.04.3) over (3.8.10-1+bionic1) ...
    dpkg: warning: downgrading libpython3.8-minimal:amd64 from 3.8.10-1+bionic1 to 3.8.5-1~20.04.3
    Preparing to unpack .../6-libpython3.8-minimal_3.8.5-1~20.04.3_amd64.deb ...
    Unpacking libpython3.8-minimal:amd64 (3.8.5-1~20.04.3) over (3.8.10-1+bionic1) ...
    Errors were encountered while processing:
     /tmp/apt-dpkg-install-vTH1pX/0-libpython3.9-stdlib_3.9.5-3~20.04.1_amd64.deb
     /tmp/apt-dpkg-install-vTH1pX/1-libpython3.9-minimal_3.9.5-3~20.04.1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    /usr/local/bin/ppa-purge: line 191: aptitude: command not found
    Warning:  Something went wrong, packages may not have been reverted
    

    AFTER LATEST FIX ATTEMPT

    understudy@understudy-System-Product-Name:~$ # sudo apt-get install ppa-purge
    understudy@understudy-System-Product-Name:~$ cd ~/Downloads
    understudy@understudy-System-Product-Name:~/Downloads$ sudo apt-get download ppa-purge
    [sudo] password for understudy: 
    understudy@understudy-System-Product-Name:~/Downloads$ dpkg -x ppa-purge_0.2.8+bzr63_all.deb ppap
    understudy@understudy-System-Product-Name:~/Downloads$ sudo cp ppap/usr/sbin/ppa-purge /usr/local/bin/
    understudy@understudy-System-Product-Name:~/Downloads$ sudo ppa-purge ppa:deadsnakes/ppa # first for bionic
    Updating packages lists
    PPA to be removed: deadsnakes ppa
    Warning:  Could not find package list for PPA: deadsnakes ppa
    understudy@understudy-System-Product-Name:~/Downloads$ sudo ppa-purge ppa:deadsnakes/ppa # second for focal
    Updating packages lists
    PPA to be removed: deadsnakes ppa
    Warning:  Could not find package list for PPA: deadsnakes ppa
    
    understudy@understudy-System-Product-Name:~/Downloads$ sudo apt-get install python3.9=3.9.5-3~20.04.1 libpython3.9-stdlib=3.9.5-3~20.04.1 \
    > libpython3.9-minimal=3.9.5-3~20.04.1 python3.9-minimal=3.9.5-3~20.04.1 --reinstall
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      libffi6 libncursesw5 libreadline7 libtinfo5
    Use 'sudo apt autoremove' to remove them.
    The following packages will be upgraded:
      libpython3.9-minimal libpython3.9-stdlib
    2 to upgrade, 0 to newly install, 2 reinstalled, 0 to remove and 36 not to upgrade.
    7 not fully installed or removed.
    Need to get 0 B/2,532 kB of archives.
    After this operation, 483 kB of additional disk space will be used.
    E: Internal Error, No file name for python3.9-minimal:amd64
    understudy@understudy-System-Product-Name:~/Downloads$ sudo apt-get install aptitude
    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.
     aptitude : Depends: aptitude-common (= 0.8.12-1ubuntu4) but it is not going to be installed
                Depends: libcwidget4 (>= 0.5.18-1) but it is not going to be installed
                Recommends: libparse-debianchangelog-perl but it is not going to be installed
     python3.9 : Depends: libpython3.9-stdlib (= 3.9.5-3~20.04.1) but 3.9.5-1+bionic1 is to be installed
     python3.9-minimal : Depends: libpython3.9-minimal (= 3.9.5-3~20.04.1) 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).
    

    after the sudo apt --fix-broken install

    [sudo] password for understudy: 
    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:
      libffi6 libncursesw5 libreadline7 libtinfo5
    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 36 not to upgrade.
    7 not fully installed or removed.
    Need to get 0 B/2,532 kB of archives.
    After this operation, 483 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 200857 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.5-1+bionic1) ...
    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.5-1+bionic1
    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.5-1+bionic1) ...
    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: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.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)
    
    • N0rbert
      N0rbert almost 3 years
      What is your Ubuntu version? Why do you mix 18.04 (bionic) with 20.04 (focal) repos? Please also add output of apt-cache policy python3.9 libpython3.9-stdlib libpython3.9-minimal python3.9-minimal to the question.
    • THeUNderstudy
      THeUNderstudy almost 3 years
      HI I put the output in the original post due to the size
    • THeUNderstudy
      THeUNderstudy almost 3 years
      Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal
    • THeUNderstudy
      THeUNderstudy almost 3 years
      Why do you mix 18.04 (bionic) with 20.04 (focal) repos? - I am not sure why this has happened
    • N0rbert
      N0rbert almost 3 years
      Install Aptitude with sudo apt-get install aptitude .
    • N0rbert
      N0rbert almost 3 years
      Please show your current list of the repositories - execute grep "^deb\ " -r /etc/apt/ --include=*.list and python sources apt-cache policy python3.9 libpython3.9-stdlib libpython3.9-minimal python3.9-minimal - add output to the question. If long - use pastebin.
    • LeonardoAyala
      LeonardoAyala about 2 years
      I had the same problem and running sudo apt --fix-broken install solved it.
  • THeUNderstudy
    THeUNderstudy almost 3 years
    N0rbert thank you so much - that seems to of worked!! i really appreciate it, i have beeb suck for ages :-)
  • N0rbert
    N0rbert almost 3 years
    I'm glad, that it is now fixed. So you can mark this problem as solved by clicking checkmark in the left of my answer.
  • Igor Foxly
    Igor Foxly almost 3 years
    Isn't faster to just sudo apt autoremove --purge python3.9-minimal python3.9 ?
  • Admin
    Admin almost 2 years
    In my case it says minimal is dependency of stdlib so I had to install minimal first. But those are the files. Thx.
  • Admin
    Admin almost 2 years
    Amazing, this helped me after 3 months of this same error! Thank you so much!!!