[英]I accidentally removed python2.7 executable
I accidentally removed /usr/bin/python2.7 executable file with rm /usr/bin/python2.7 how can I restore it?我不小心用 rm /usr/bin/python2.7 删除了 /usr/bin/python2.7 可执行文件,我该如何恢复它? Thank you谢谢
To get past the postinst error, you can put true
as a dummy executable in the place of /usr/bin/python2.7
:要克服 postinst 错误,您可以将true
作为虚拟可执行文件放在/usr/bin/python2.7
的位置:
cp /bin/true /usr/bin/python2.7
Then you should be able to fix the installation using:然后您应该能够使用以下方法修复安装:
apt install -f
After this point, you should be able to reinstall python2.7
with this command:在此之后,您应该可以使用以下命令重新安装python2.7
:
sudo apt-get install --reinstall python2.7
This should bring back the python2.7
executable for real.这应该带回真正的python2.7
可执行文件。
Note that this question is more suited to the Super User site.请注意,此问题更适合超级用户站点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.