简体   繁体   中英

i deleted /usr/bin/python3 by mistake

Hello when I try to update php I deleted /usr/bin/python3 by mistake

i run this command:

    cd /usr/bin
rm python3
ln -s python3.5 python3

then most of apps don't work

notice: i am use parrot os

Try to use command like this:

ln -s /root/py36/bin/python3 /usr/bin/python3

In my impression, recommend using the absolute path to represent source and target path.

If you want use relative path, try this:

ln -s ./python3.5 ./python3

Well, you deleted the python3 folder, so I suppose you have to install Python again?

Parrot OS uses the APT package manager, so you can simply do the following in the terminal:

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.5

Then you can run ln again, but of course don't remove the python folder.

If you just want the latest Python version:

$ sudo apt update
$ sudo apt install python3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM