Wednesday, 20 February 2019

Ubuntu upgrade from 16.04 to 18.04 LTS python3 fix

Ubuntu complains:

Your python3 installation is corrupted. Please fix /usr/bin/python3 symlink.

This is because do-release-upgrade script check the symlink of /usr/bin/python3. But update-alternatives generally point this symlink to another link /etc/alternatives/python**.

The solution is simple. Make sure you have python default version installed. For 16.04, normally it is 3.5. Otherwise, we have to  check the log of /var/log/dist-upgrade/main.log.

2019-02-20 21:15:02,296 DEBUG python3 symlink points to: '/usr/bin/python3.7', but expected is 'python3.5' or '/usr/bin/python3.5'

If similar statement found, congratulations. We got the root cause of "python corrupted" issue.

We can simply issue command as below:

sudo rm /usr/bin/python3
sudo ln /usr/bin/python3 -s /usr/bin/python3.5

After upgrading, we can run update-alternatives --install python3 again if we really want python3.6 or higher.


7 comments:

Jesus Andrus said...

I was looking for this kind of valuable information. Your article is really helpful for me. Thanks a lot.

Steepster

3D Artist Online

Photoshop Creative

Udemy

Colour Lovers

Wanelo

Intensedebaite

4Shared

500Px

PublicLab

Unknown said...

I was looking for this kind of valuable information. Your article is really helpful for me. Thanks a lot.

MightyCause

Khaleej times

Buzzsprout

Issuu

Rhizome

Getcosmetic

Axbilisim

Tvfanatic

OhmStudio

DivePhotoGuide

Jesus Andrus said...

I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.


CodeChef

EverPlaces

GrabCad

InPrnt

SmackJeeves

Ultimate Guitar

RauteMusik

OpenSit

Eyeka

LetterBoxd

Wesley Chapman said...

I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.


Wanelo

Intense Debate

4shared

500Px

Public lab

Xooit

Steinberg

Torgi

Its my URL's

Manozaidimai

Wesley Chapman said...

I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.


Balconytv

PressBook

Subrion

Hackster

Turnkey

GameKyo

Whazzup

Quibblo

PeopleSap

Forexfactory

Clarence Beltran said...

I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.


3DArtistOnline

PhotoshopCreative

Udemy

ColourLovers

BoredPanda

IntenseDebate

Slides

500Px

Playfm

OhmStudio

Jesus Andrus said...

I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.


Sinesparks

Diebythesword

NetworkingPeople

Pipelineae

Darksminky

WowGuildPortal

Electrokilla