ImportError: Nenhum módulo chamado debian.deb822

1

A configuração do meu Ubuntu 14.04 parece estar completamente corrompida, na medida em que não consigo instalar com êxito nenhum pacote usando o apt-get install. O erro comum é "nenhum módulo chamado debian.deb822". Um exemplo está abaixo. Observe que meu objetivo não é necessariamente instalar esse pacote específico; apenas para poder instalar qualquer pacotes. Qualquer ajuda seria muito apreciada!

box:~/python> sudo apt-get install update-notifier
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apturl is already the newest version.
apturl-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 394 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up update-notifier-common (0.154.1ubuntu1) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 26, in <module>
    import debian.deb822
ImportError: No module named debian.deb822
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on update-notifier-common (= 0.154.1ubuntu1); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
 update-manager depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on update-manager; however:
  Package update-manager is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on ubuntu-releasNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                  No apport report written because the error message indicates its a followup error from a previous failure.
            No apport report written because MaxReports is reached already
                                                                          No apport report written because MaxReports is reached already
                                                        e-upgrader-gtk; however:
  Package ubuntu-release-upgrader-gtk is not configured yet.
 ubuntu-desktop depends on update-manager; however:
  Package update-manager is not configured yet.
 ubuntu-desktop depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 update-notifier-common
 update-notifier
 update-manager
 ubuntu-release-upgrader-gtk
 ubuntu-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT 1: Depois de executar "sudo apt-get update" e "sudo apt-get upgrade", a saída é um pouco diferente, mas o mesmo erro é lançado:

box:~> sudo apt-get upgrade update-notifier
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
update-notifier is already the newest version.
The following packages have been kept back:
  libreoffice libreoffice-base libreoffice-base-core libreoffice-base-drivers
  libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-gnome libreoffice-gtk libreoffice-gtk3 libreoffice-help-en-us
  libreoffice-impress libreoffice-math libreoffice-style-galaxy
  libreoffice-style-human libreoffice-style-tango libreoffice-writer
  linux-generic linux-generic-lts-vivid linux-headers-generic
  linux-headers-generic-lts-vivid linux-image-generic
  linux-image-generic-lts-vivid linux-signed-generic-lts-vivid
  linux-signed-image-generic-lts-vivid linux-tools-virtual-lts-wily
  openjdk-8-jdk openjdk-8-jre openjdk-8-jre-headless python3-uno shim-signed
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up update-notifier-common (0.154.1ubuntu1) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 26, in <module>
    import debian.deb822
ImportError: No module named debian.deb822
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on update-notifier-common (= 0.154.1ubuntu1); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
 update-manager depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on update-manager; however:
  Package update-manager is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on ubuntu-releasNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                  No apport report written because the error message indicates its a followup error from a previous failure.
            No apport report written because MaxReports is reached already
                                                                          No apport report written because MaxReports is reached already
                                                        e-upgrader-gtk; however:
  Package ubuntu-release-upgrader-gtk is not configured yet.
 ubuntu-desktop depends on update-manager; however:
  Package update-manager is not configured yet.
 ubuntu-desktop depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT 2: Depois de executar as correções sugeridas de @Raphael, a saída mudou um pouco, mas o problema persiste:

box:~/Downloads> sudo apt-get install update-notifier
Reading package lists... Done
Building dependency tree       
Reading state information... Done
update-notifier is already the newest version.
The following packages were automatically installed and are no longer required:
  libreoffice-gtk3 linux-headers-3.13.0-77 linux-headers-3.13.0-77-generic
  linux-image-3.13.0-77-generic linux-image-extra-3.13.0-77-generic
  linux-lts-wily-tools-4.2.0-27 linux-tools-4.2.0-27-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up update-notifier-common (0.154.1ubuntu1) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 26, in <module>
    import debian.deb822
ImportError: No module named debian.deb822
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on update-notifier-common (= 0.154.1ubuntu1); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
 update-manager depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on update-manager; however:
  Package update-manager is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on ubuntu-releasNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                  No apport report written because the error message indicates its a followup error from a previous failure.
            No apport report written because MaxReports is reached already
                                                                          No apport report written because MaxReports is reached already
                                                        e-upgrader-gtk; however:
  Package ubuntu-release-upgrader-gtk is not configured yet.
 ubuntu-desktop depends on update-manager; however:
  Package update-manager is not configured yet.
 ubuntu-desktop depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 update-notifier-common
 update-notifier
 update-manager
 ubuntu-release-upgrader-gtk
 ubuntu-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Kreuzfeld 15.08.2016 / 04:53

3 respostas

1

O problema é que os pacotes relacionados ao "deb822" e "apt" do Python foram instalados, mas não no local correto. Eu (1) identifiquei a localização destes usando locate deb822 , (2) identifiquei onde eles "devem" viver:

python
import numpy
print numpy

e depois (3) copiou os arquivos para o diretório apropriado via:

sudo cp -r /usr/lib/python2.7/dist-packages/apt* /appropriate_directory/python2.7/site-packages/
sudo cp -r /usr/lib/python2.7/dist-packages/deb* /appropriate_directory/python2.7/site-packages/

Depois disso, sudo apt-get install X parece funcionar bem.

    
por Kreuzfeld 18.08.2016 / 23:55
0

Você tem 394 pacotes que não foram atualizados. O mais provável é que isso esteja causando problemas de dependência. Executar

sudo apt-get update
sudo apt-get upgrade
    
por tlhIngan 15.08.2016 / 04:57
0

De Ubuntuforums :

É devido à indisponibilidade do pacote python-six .

Para instalá-lo, faça:

sudo apt-get update; sudo apt-get install --reinstall python-six

EDIT 1 : -

Como apt-get install parece não funcionar, você pode instalá-lo manualmente usando:

cd ~/Downloads; wget -c http://ftp.us.debian.org/debian/pool/main/s/six/python-six_1.10.0-3_all.deb; sudo dpkg -i python-six_1.10.0-3_all.deb

EDIT 2 : -

De Debian :

  

Arquivos de controle de um ou vários parágrafos no estilo RFC822, por exemplo      debian / control, .changes, .dsc, Pacotes, Fontes, Release, etc.      (módulo debian.deb822)

Então, você pode precisar desse pacote. Para instalar:

cd ~/Downloads; wget -c http://ftp.us.debian.org/debian/pool/main/p/python-debian/python-debian_0.1.28_all.deb; sudo dpkg -i python-six_1.10.0-3_all.deb
    
por Raphael 15.08.2016 / 05:25