Поскольку я полностью испортил мою установку python, я вручную удалил все файлы python и теперь пытаюсь переустановить его.
Когда я печатаю apt-get install --reinstall python2.7
, я получаю это сообщение об ошибке:
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 0 not to upgrade.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python-minimal (2.7.3-0ubuntu2.2) ...
/var/lib/dpkg/info/python-minimal.postinst: 4: /var/lib/dpkg/info/python-minimal.postinst: python2.7: not found
dpkg: error processing python-minimal (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up python2.7 (2.7.3-0ubuntu3.4) ...
/var/lib/dpkg/info/python2.7.postinst: 6: /var/lib/dpkg/info/python2.7.postinst:
python2.7: not found
dpkg: error processing python2.7 (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of python:
python depends on python2.7 (>= 2.7.3); however:
Package python2.7 is not configured yet.
python depends on python-minimal (= 2.7.3-0ubuntu2.2); however:
Package python-minimal is not configured yet.
dpkg: error processing python (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
Errors were encountered while processing:
python-minimal
python2.7
python
E: Sub-process /usr/bin/dpkg returned an error code (1)
Как мне восстановиться после этого?
Редактировать: В дополнение к предложению Кубахаха, я попытался
# dpkg -P python2.7
и это не сработало из-за зависимостей. Это удалило пакеты:
# dpkg -P libapache2-mod-wsgi libpython2.7 python2.7
Но потом, когда я попытался:
# apt-get install python2.7 libapache2-mod-wsgi libpython2.7
я получил это сообщение об ошибке:
/var/lib/dpkg/info/python-minimal.postinst: 4: /var/lib/dpkg/info/python-minimal.postinst: python2.7: not found
dpkg: error processing python-minimal (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg / apt, кажется, я должен быть очень хрупким в том, что, когда система находится в плохом состоянии, они, кажется, никогда не смогут вернуть себя в хорошее состояние.
sudo apt-get autoremove
удаляет все = ( – ashutosh singh 14.05.2020, 00:29sudo dpkg -P python-minimal
тогдаsudo apt-get autoremove && sudo apt-get clean sudo apt-get update && sudo apt-get -f
It' s установленный на уничтожителя: p – Hemant N. Karmur 14.05.2020, 00:30