Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
63
rated 0 times [  63] [ 0]  / answers: 1 / hits: 66727  / 1 Year ago, sun, november 20, 2022, 9:39:36

I was upgrading from 13.10 to 14.04 (dev for now, stable in a few hours) using do-release-upgrade and encountered the following problem:


Can not upgrade 

Your python install is corrupted. Please fix the '/usr/bin/python' symlink.

I solved the problem after messing around a bit, so I'd like to share my solution here. Hope this could help someone.


More From » upgrade

 Answers
7

My problem turned out to be solely due to an altered /usr/bin/python symlink as suggested in the error message. I was using update-alternatives with /usr/bin/python so it was pointing to /etc/alternatives/python. Turned out that do-release-upgrade is really strict with this symlink and merely selecting python2.7 with update-alternatives isn't enough, so I ended up forcing it to its original state:



sudo ln -sf /usr/bin/python2.7 /usr/bin/python


And that solved the problem.



If this doesn't work for you, then I guess you have a genuinely corrupted python install. I'd suggest



sudo apt-get install --reinstall python

[#25987] Tuesday, November 22, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lawain

Total Points: 150
Total Questions: 106
Total Answers: 101

Location: China
Member since Mon, Aug 22, 2022
2 Years ago
lawain questions
;