简体   繁体   中英

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? Thank you

To get past the postinst error, you can put true as a dummy executable in the place of /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:

sudo apt-get install --reinstall python2.7

This should bring back the python2.7 executable for real.

Note that this question is more suited to the Super User site.

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