Dependências quebradas após o upgrade

5

Após um apt-get upgrade Eu recebi o seguinte erro:

Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 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 python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error     from a previous failure.
                      Errors were encountered while processing:
 python3.3-minimal
 python3.3
E: Sub-process /usr/bin/dpkg returned an error code (1)

e não consigo desligar meu computador ...

Eu acho que não instalei corretamente o python 3.3, mas como posso repará-lo?

Editar: eu tentei apt-get --reinstall install python2 python2-support mas eu tenho: o mesmo erro

EDIT: Mais informações

no meu sistema: Linux Mycomputer 3.5.0-34-genérico # 55-Ubuntu SMP Qui Jun 6 20:20:19 UTC 2013 i686 i686 i686 GNU / Linux

dpkg --print-architecture   
i386

Eu costumava ter o Ubuntu 12.10. Meu problema ocorreu quando tentei atualizá-lo para 13.04. Eu recebi uma mensagem de erro dizendo que o processo foi interrompido porque havia muitos erros.

Eu então tentei executar sudo apt-get update && sudo apt-get upgrade , mas encontrei o erro acima.

Eu tive um problema parecido alguns meses atrás quando eu apaguei erroneamente o python2 do meu computador. Eu não pude desligar meu computador clicando no ícone (ele não responde) e desligando. A única maneira era forçá-lo a desligar manualmente. Quando eu liguei novamente, eu só tinha uma área de trabalho vazia e não podia fazer nada. Isso foi corrigido ao reinstalar todo o sistema.

Pesquisando na internet, experimentei vários comandos:

sudo dpkg --configure -a

que resultou em

Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
       import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
      File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.


sudo apt-get --reinstall install python3 python3-support
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-support


sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)




dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3
 python3.3


python --version

retorna o Python 2.7.4

Fazendo:

cd /tmp
sudo apt-get download python3
sudo dpkg -i python3*.deb && apt-get dist-upgrade

retorna

    (Reading database ... 374310 files and directories currently installed.)
Preparing to replace python3 3.3.1-0ubuntu1 (using python3_3.3.1-0ubuntu1_i386.deb) ...
running python pre-rtupdate hooks for python3.3...
Unpacking replacement python3 ...
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
 python3

Eu também tentei remover e reinstalar o python3

Alguma ajuda, por favor?

Editado após a resposta do Gx1sptDTDa

sudo apt-get clean
sudo apt-get dist-upgrade 

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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 python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)

Edit: Instalação de todas as dependências para o python3.3-minimal

sudo apt-get install libc6 libexpat1 libpython3.3-minimal zlib1g

retorna

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version.
libexpat1 is already the newest version.
libpython3.3-minimal is already the newest version.
libpython3.3-minimal set to manually installed.
zlib1g is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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 python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
   File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
     from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDITAR: sudo dbkg-reconfigure -a

1 / pergunta: ─────────────────────────────┤ Adduser ├────────────────── ──────────────┐
 │ │
 │ Por padrão, os diretórios home dos usuários podem ser lidos por todos os usuários no diretório │  │ sistema. Se você quer aumentar a segurança e privacidade, você pode querer │
 │ diretórios home para serem legíveis somente para seus proprietários. Mas em caso de dúvida, │
 │ deixe esta opção ativada. │
 │ │
 │ Isso só afetará os diretórios home dos usuários adicionados a partir de agora com │
 │ o comando adduser. │
 │ │
 │ Você quer diretórios pessoais legíveis em todo o sistema?

Disse sim

2 / ┤ Configurando o apparmor ├──────────────────────────┐
 │ Por favor, insira uma lista separada por espaço de quaisquer locais adicionais para o usuário │  │ diretórios home. Esses locais são adicionais aos especificados em │
 │ /etc/apparmor.d/tunables/home e deve terminar com um '/'. │
 │ │
 │ Exemplo: se os diretórios do usuário estiverem armazenados em / srv / nfs / home e │  │ / mnt / homes, você deve digitar "/ srv / nfs / home / / mnt / homes /". │
 │ │
 │ Locais adicionais de diretório inicial:

Não sei qual local indicar ... então eu apenas passo

Por fim, leio no shell:

update-rc.d: warning: /etc/init.d/acpi-support missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
acpid stop/waiting
acpid start/running, process 24816
 * Starting AppArmor  

profiles                                                              Skipping      
 profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
                                                                     [ OK ]
 * Reloading AppArmor profiles                                                  
Skipping     profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
                                                                     [ OK ]
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <[email protected]>" 
not     changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <[email protected]>" 
not     changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012)  
  <[email protected]>"     not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) 
<[email protected]>"     not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
/usr/sbin/dpkg-reconfigure: asymptote is broken or not fully installed

Editar: Synaptic No synaptic, nenhuma "dependências quebradas" é exibida (clico no status e tudo o que posso ver é: Todos Instalado Instalado (local ou obsoleto) Instalado (manual) Não instalado Não instalado (configuração residual)

    
por bigTree 04.07.2013 / 09:25

2 respostas

2

EDITAR

O problema estava relacionado ao seguinte relatório de erros: link

Siga as etapas nos comentários de 3 a 5, mas altere o caminho para python3.3, em vez de 2.7.

    
por Gx1sptDTDa 04.07.2013 / 11:53
0

Eu tive o mesmo problema com um pacote diferente, libamd2.3.1: amd64. Eu recebi este erro:

> sudo apt upgrade
[...]
Errors were encountered while processing:
 libamd2.3.1:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Seguindo isso thread, consegui removê-lo com o dpkg e reinstalar com o apt.

sudo dpkg --remove --force-remove-reinstreq libamd2.3.1:amd64
sudo apt-get install libamd2.3.1:amd64
    
por ErnestScribbler 26.05.2017 / 01:18