By cznew03
When trying to do “do-release-upgrade” from current Ubuntu 18.04 to new 19.04 I am getting error
"Your python3 install is corrupted. Please fix the ‘/usr/bin/python3’ symlink "
I currently have python 2.7, 3, 3.6 and 3.7 installed.
Please advise what shall i try. Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Any update? I have manually install python2.7 and python3.7 after deleting the executable accidentally.
linux@linux:/usr/bin$
==> which python
/usr/bin/python
linux@linux:/usr/bin$
==> l python
lrwxrwxrwx 1 root root 24 May 22 00:47 python -> /usr/local/bin/python2.7
linux@linux:/usr/bin$
==> l python*
lrwxrwxrwx 1 root root 24 May 22 00:47 python -> /usr/local/bin/python2.7
lrwxrwxrwx 1 root root 22 May 22 00:47 python3 -> /usr/local/bin/python3
linux@linux:/usr/bin$
==> python --version
Python 3.7.4
linux@linux:/usr/bin$
==> lsb_release -a
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 25, in <module>
import lsb_release
ModuleNotFoundError: No module named 'lsb_release'
linux@linux:/usr/bin$
==> sudo do-release-upgrade
Traceback (most recent call last):
File "/usr/bin/do-release-upgrade", line 8, in <module>
from DistUpgrade.DistUpgradeVersion import VERSION
ModuleNotFoundError: No module named 'DistUpgrade'
Seems i have done something to python.
Now when i try sudo apt upgrade ,
i get
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)```
Hello,
I believe this is a know issue, you can also check this in the following report in the launchpad bugs forum:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1825655
The suggested workaround is to remove the python’s binary in /usr/bin and then to create a symlink and perform the upgrade:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
and then perform the upgrade
do-release-upgrade
I would also recommend you to backup your droplet in case something goes wrong, however you will simply remove the binary file from the /usr/bin and then create a symlink to replace it.
Let me know how it goes.
Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.