且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

不小心apt-get remove python后如何恢复

更新时间:2023-02-02 20:44:42

哈利路亚.

sudo apt-get install --reinstall python python-chardet python-colorama python-distlib python-django python-django-tables2 python-six python-html5lib python-lxml python-minimal python-pkg-resources python-setuptools python-urllib3 python-requests python-pip python-virtualenv

sudo apt-get install --reinstall python-dnspython

sudo apt autoremove

sudo apt-get -f install

在互联网最深的坑里冒险了一整天后,这些命令对我有用.

After a whole day of adventures in the deepest pits of internet, these commands worked for me.

python-dnspython 和 samba 在第一个命令后仍然丢失,--reinstall python-dnspython 也拉入了 samba.Autoremove 删除了不必要的依赖项.

python-dnspython and samba was still missing after the first command, --reinstall python-dnspython pulled samba in as well. Autoremove removed the needless dependencies.

当然,其中一些可能是多余的,但我只是在关注一些长期丢失的论坛帖子,重要的是它有效.

Naturally some of these could be quite redundant but I was just following some long lost forum posts all over the place and what matters is that it worked.