Problemas ao instalar no terminal, continuo recebendo um “E: subprocesso / usr / bin / dpkg retornou um código de erro (1)”

0

Eu instalei recentemente o Ubuntu. Inicialmente, tudo estava bem e as instalações funcionavam como instruído em vários segmentos.

Eu já encontrei um problema ao tentar baixar um editor para Python, especificamente ao tentar construir e instalar o qt5. Quando tento instalar o g ++ usando sudo apt-get install build-essential , recebi os seguintes erros:

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)

Alguém poderia me ajudar?

    
por Julien R-b 06.06.2016 / 16:19

2 respostas

1

A resolução às vezes não é tão fácil, especialmente se apport estiver envolvida, aqui está a maneira como eu a abordaria:

Primeiro, conforme mencionado, acesse sua lista de apt com:

sudo apt-get update

Agora, para corrigir o problema:

sudo apt-get install --reinstall apport
sudo apt-get -f install
sudo apt-get dist-upgrade

E se ainda não bastasse baixar os pacotes em questão de packages.ubuntu.com e instalá-los com:

sudo dpkg -i <package-name>
    
por Videonauth 06.06.2016 / 16:40
0

Você está mantendo pacotes em estado inconsistente. Por favor, execute sudo apt update e sudo apt-get -f install para resolver problemas de dependências.

    
por Michal Polovka 06.06.2016 / 16:21