Score:0

Upgrading from Ubuntu 20.10 to 21.04 fails because of python, how to fix it?

br flag

This is the displayed message:

"Can not upgrade

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

Could someone explain how to fix the above issue so I can upgrade? If uninstalling and reinstalling python is your answer, could you provide step-by-step instructions?

ru flag
What did you change before hand? This doesn't happen on a plain upgrade, you must have made some change to cause this error.
cn flag
I guess if `python3` is a symlink. delete it and create it again using the path as actual python binary. **Do it at your own risk**
HuHa avatar
es flag
Does this answer your question? ["Your python3 install is corrupted"](https://askubuntu.com/questions/1104052/your-python3-install-is-corrupted)
Zuitlander avatar
br flag
@ThomasWard I have done many things, but I don't know how they affect or relate to this issue. I only followed the normal steps to upgrade, nothing more.
Zuitlander avatar
br flag
@xcodz-dot I have a timeshift backup in a different HD, so there is no problem. Could you provide some instructions?
Zuitlander avatar
br flag
@HuHa It could if I were on version 16.04, I'll give it a try.
Score:0
br flag

Following some of the suggestions, I did the following:

  1. Open terminal (if not possible, try "ctrl" + "alt" + "F3") and then type:

    sudo nano /usr/bin/gnome-terminal

  2. Then change first line from:

    #!/usr/bin/python3

to

#!/usr/bin/python3.8
  1. restart the system (type reboot on the terminal)

  2. Then open terminal again and type:

    sudo apt-get install --reinstall python3 python3-minimal python3.5 python3.5-minimal

  3. Once it's done, reboot your computer and you'll be able to update again.

Zuitlander avatar
br flag
This helped! Thanks a lot.
Score:0
cn flag

Open the terminal using Ctrl+Alt+F3 if gnome terminal does not open for you and continue the below steps to fix the problem

For this specific case the symlinks seems to be corrupted. To fix this:

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

The above should work for almost all corrupted symlinks. Make sure to change arguments to command ln for fixing broken symlink. First argument is real file and second argument is name of symlink.

Do it at your own risk

Zuitlander avatar
br flag
After doing this, computer doesn't boot to GUI, even with startx command. But it kinda works, from this moment onward it's possible to update, there are still some errors during the process, but it may help someone who doesn't need the GUI.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.