linuxubuntuterminal

terminal on ubuntu can not open


I uninstalled accidentally python3.10 using rm -rf python3.10 in /usr/bin my terminal is not working anymore but can access through VSCode but it say enter image description here any suggestion? thank you in advanced


Solution

  • It is because /usr/bin/python3 is a soft link to /usr/bin/python3.10 which is the main binary that runs python3 on your machine. This should help :

    $ ls -l /usr/bin/python3
    lrwxrwxrwx 1 root root 10 May 31 13:02 /usr/bin/python3 -> python3.10
    
    

    You might need to install python again to get the binary. If you have different version of python available that you want to use, create link to it like this:

    ln -s file1 link1 which would be in case you have python3.10 re/installed

    ln -s /usr/bin/python3.10 /usr/bin/python3
    

    Considering you deleted python3.10 binary by mistake!