0

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?

Zuitlander
  • 11
  • 3
  • 1
    What did you change before hand? This doesn't happen on a plain upgrade, you must have made some change to cause this error. – Thomas Ward Jun 29 '21 at 15:15
  • 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** – AmaanK Jun 29 '21 at 15:21
  • 2
    Does this answer your question? ["Your python3 install is corrupted"](https://askubuntu.com/questions/1104052/your-python3-install-is-corrupted) – HuHa Jun 29 '21 at 15:25
  • @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 Jul 01 '21 at 12:06
  • @xcodz-dot I have a timeshift backup in a different HD, so there is no problem. Could you provide some instructions? – Zuitlander Jul 01 '21 at 12:09
  • @HuHa It could if I were on version 16.04, I'll give it a try. – Zuitlander Jul 01 '21 at 12:09

2 Answers2

0

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
  • 11
  • 3
0

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

AmaanK
  • 131
  • 4
  • 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. – Zuitlander Jul 23 '21 at 08:26