Log:
-----
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:
python3.8 : Depends: python3.8-minimal (= 3.8.13-1+bionic2) but it is not going to be installed
Depends: libpython3.8-stdlib (= 3.8.13-1+bionic2) but it is not going to be installed
python3.9 : Depends: libpython3.9-stdlib (= 3.9.12-1+bionic2) but 3.9.12-1+bionic1 is to be installed
python3.9-minimal : Depends: libpython3.9-minimal (= 3.9.12-1+bionic2) but 3.9.12-1+bionic1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt --fix-broken install
Log:
----
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 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
3 not fully installed or removed.
Need to get 0 B/2,483 kB of archives.
After this operation, 17.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 128106 files and directories currently installed.)
Preparing to unpack .../libpython3.9-stdlib_3.9.12-1+bionic2_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.12-1+bionic2) over (3.9.12-1+bionic1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.9-stdlib_3.9.12-1+bionic2_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.12-1+bionic1
Preparing to unpack .../libpython3.9-minimal_3.9.12-1+bionic2_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.12-1+bionic2) over (3.9.12-1+bionic1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.9-minimal_3.9.12-1+bionic2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.9/typing.py', which is also in package libpython3.9-stdlib:amd64 3.9.12-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.12-1+bionic2_amd64.deb
/var/cache/apt/archives/libpython3.9-minimal_3.9.12-1+bionic2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
os information
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bioni
uname -a
Linux otc-cros-bld16 4.15.0-175-generic #184-Ubuntu SMP Thu Mar 24 17:48:36 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
description
What I am trying to do:
When I try to install python versions 3.8 and 3.9 on ubuntu 18.04 machines. I used the deadsnakes PPA to do this.
PPA: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
Steps I followed:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt install python3.8
sudo apt --fix-broken install
os information
lsb_release -a
uname -a