尝试安装 python3.7 后所有 linux 命令都不起作用

尝试安装 python3.7 后所有 linux 命令都不起作用

我有一个大而奇怪的问题。我在 Hetzner 上有一个使用 Ubuntu 20 的服务器。

我尝试使用以下指令安装 python3.7.2:

wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz 
Where version can be specific, the above FTP location contains lots of versions.
tar -xvf Python-<version>.tgz 
cd Python-<version>  
./configure 
make 
sudo checkinstall 

在“make”命令之前一切都很好,但在“sudo checkinstall”之后我收到错误:

File "/home/Python-3.7.2/Lib/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
make: *** [Makefile:1130: install] Error 1

****  Installation failed. Aborting package creation.

Restoring overwritten files from backup.../usr/bin/checkinstall: line 95: /usr/bin/gettext: No such file or directory


/usr/bin/checkinstall: line 102: /usr/bin/gettext: No such file or directory
/usr/bin/checkinstall: line 319: /usr/bin/rm: No such file or directory
/usr/bin/checkinstall: line 320: /usr/bin/rm: No such file or directory
/usr/bin/checkinstall: line 95: /usr/bin/gettext: No such file or directory


/usr/bin/checkinstall: line 95: /usr/bin/gettext: No such file or directory

现在此时所有 linux 命令都不起作用,ls、ps、python 等......

-bash: /usr/bin/su: No such file or directory
-bash: /usr/bin/ls: No such file or directory
-bash: /usr/bin/ps: No such file or directory

我手动重新启动服务器,但它不起作用。有人知道现在是什么情况吗?我从未使用过“make”和“checkinstall”命令,现在我陷入困境

相关内容