do_release_upgrade on ubuntu kept python bionic libs on focal
When doing a release upgrade in ubuntu 18, it seems that ubuntu kept some python libraries from bionic (18) on focal (20). The result is, I get this error:
when trying to install vim:=
vim : Depends: libpython3.8 (>= 3.8.2) but it is not going to be installed
when trying to install libpython3.8:=
libpython3.8 : Depends: libpython3.8-stdlib (= 3.8.5-1~20.04) but 3.8.6-1+bionic2 is to be installed
The output of:=
apt list | grep python3.8 | grep bionic
libpython3.8-minimal/now 3.8.6-1+bionic2 amd64 [installed,local]
libpython3.8-stdlib/now 3.8.6-1+bionic2 amd64 [installed,local]
python3.8-minimal/now 3.8.6-1+bionic2 amd64 [installed,local]
python3.8/now 3.8.6-1+bionic2 amd64 [installed,local]
Looks like these have wrong versions.
I found this link that might be relevant:
which suggests running:=
apt-get autoremove libpython3.8-stdlib#Record all packages removed
apt-get install libpython3.8-stdlib
apt-get install all packages removed
apt-get install ubuntu-desktop
And re-installing everything that depends on it.
My questions are, is there a better way? And, if I do the steps of
removing the standard python lib, will my system disconnect from
the internet and prevent me from continuing with the re-install?
Usually when it comes to upgrades like this we recommend creating a new server with the upgraded image (Ubuntu 20.04) and then copying your data over from the old server using a tool like rsync. The reason we suggest this approach is because inline upgrades typically result in issues such as this. For example, in trying to recreate the issue you mentioned above by performing an upgrade to my own 18.04 server, I ran into a slew of other problems - still trying to resolve…
More details and thorough instruction about this approach can be found here: Ubuntu 20.04 Focal Fossa
If you want to move forward with your current setup, I found a few resources that may prove useful though I have not tested these myself. I would recommend activating backups before trialing different potential solutions in case something goes further awry and you need to reboot from a previous image. We charge for backups by the hour, so you can cancel them immediately after and only incur a minimal cost.
A user in this post suggested the following:
sudo apt install libpython3.8:amd64=3.8.2-1ubuntu1.1 libpython3.8-dev:amd64=3.8.2-1ubuntu1.1 libpython3.8-minimal:amd64=3.8.2-1ubuntu1.1 libpython3.8-stdlib:amd64=3.8.2-1ubuntu1.1 python3.8=3.8.2-1ubuntu1.1 python3.8-minimal=3.8.2-1ubuntu1.1
And finally, a post from LiquidWeb that may contain relevant information: How to Install and Correct Dependencies Issues in Ubuntu
Though again, I would ensure you have a backup enabled before experimenting.