简体   繁体   English

我错误地删除了/usr/bin/python3

[英]i deleted /usr/bin/python3 by mistake

Hello when I try to update php I deleted /usr/bin/python3 by mistake您好,当我尝试更新 php 时,我误删除了 /usr/bin/python3

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?那么,你删除了python3文件夹,所以我想你必须重新安装Python?

Parrot OS uses the APT package manager, so you can simply do the following in the terminal: Parrot OS 使用 APT package 管理器,因此您可以在终端中简单地执行以下操作:

$ 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.然后你可以再次运行ln ,但当然不要删除 python 文件夹。

If you just want the latest Python version:如果您只想要最新的 Python 版本:

$ sudo apt update
$ sudo apt install python3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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