Проблемы при установке на терминале, я продолжаю получать "E: sub-process /usr/bin/dpkg вернул код ошибки (1)"
Я недавно установил Ubuntu. Первоначально все было хорошо, и установки работали в соответствии с инструкциями в различных темах.
Теперь я столкнулся с проблемой при попытке загрузить редактор для Python, особенно при попытке собрать и установить qt5. Когда я пытаюсь установить g++, используя sudo apt-get install build-essential
Я получил следующие ошибки:
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
0 to upgrade, 0 to newly install, 0 to remove and 13 not to upgrade.
8 not fully installed or removed.
Need to get 0 B/119 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] dpkg: error processing package apport (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
No apport report written because the error message indicates it's a follow-up error from a previous failure.
dpkg: dependency problems prevent configuration of apport-gtk:
apport-gtk depends on apport (>= 0.41); however:
Package apport is not configured yet.
dpkg: error processing package apport-gtk (--configure):
dependency problems - leaving unconfigured
Setting up python-cairo (1.8.8-2) ...
/var/lib/dpkg/info/python-cairo.postinst: 6: /var/lib/dpkg/info/python-cairo.postinst: pycompile: not found
dpkg: error processing package python-cairo (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up python-gobject-2 (2.28.6-12ubuntu1) ...
/var/lib/dpkg/info/python-gobject-2.postinst: 6: /var/lib/dpkg/info/python-gobject-2.postinst: pycompile: not found
dpkg: error processing package python-gobject-2 (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports has already been reached
dpkg: dependency problems prevent configuration of python-gtk2:
python-gtk2 depends on python-cairo (>= 1.0.2-1.1); however:
Package python-cairo is not configured yet.
python-gtk2 depends on python-gobject-2 (>= 2.21.3); however:
Package python-gobject-2 is not configured yet.
dpkg: error processing package python-gtk2 (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
dpkg: dependency problems prevent configuration of python-glade2:
python-glade2 depends on python-gtk2 (= 2.24.0-4ubuntu1); however:
Package python-gtk2 is not configured yet.
dpkg: error processing package python-glade2 (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
dpkg: dependency problems prevent configuration of python-vte:
python-vte depends on python-gtk2; however:
Package python-gtk2 is not configured yet.
dpkg: error processing package python-vte (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
dpkg: dependency problems prevent configuration of pypar2:
pypar2 depends on python-gtk2 (>= 2.8.6-1); however:
Package python-gtk2 is not configured yet.
pypar2 depends on python-glade2 (>= 2.8.6-1); however:
Package python-glade2 is not configured yet.
pypar2 depends on python-vte (>= 0.12.2-1); however:
Package python-vte is not configured yet.
dpkg: error processing package pypar2 (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
apport
apport-gtk
python-cairo
python-gobject-2
python-gtk2
python-glade2
python-vte
pypar2
E: Sub-process /usr/bin/dpkg returned an error code (1)
Может ли кто-нибудь помочь, пожалуйста?
2 ответа
Решить иногда не так просто, особенно если apport
сама вовлечена, вот способ, которым я хотел бы приблизиться к этому:
Сначала как уже упоминалось apt
список до скорости с:
sudo apt-get update
Теперь приступим к решению самой проблемы:
sudo apt-get install --reinstall apport
sudo apt-get -f install
sudo apt-get dist-upgrade
И если этого по-прежнему недостаточно, загрузите соответствующие пакеты с http://packages.ubuntu.com/ и установите их с помощью:
sudo dpkg -i <package-name>
Вы держите посылки в несогласованном состоянии. Пожалуйста, запустите sudo apt update
а также sudo apt-get -f install
решить проблемы зависимостей.