apt-get fornece “Subprocesso / usr / bin / dpkg retornou um código de erro”

0

Então eu estava tentando instalar o Cython na minha máquina Debian, e na instalação ele me deu o código de erro:

 Sub-process /usr/bin/dpkg returned an error code (1)

Agora, como o estudante profissional de puro sangue que eu sou, depois de acordar, eu não pensei mais nisso, e pensei em ver melhor depois. No entanto, agora, ao tentar instalar qualquer coisa, ou atualizar, o apt-get me dá o seguinte

Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg --configure -a fornece o seguinte

Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
  subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 cython

sudo apt-get install -f

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
  subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
  cython
E: Sub-process /usr/bin/dpkg returned an error code (1)

cat /etc/apt/sources.list

#------------------------------------------------------------------------------#
#                   OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#

###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib
deb-src http://deb.debian.org/debian/ stable main contrib

deb http://deb.debian.org/debian/ stable-updates main contrib
deb-src http://deb.debian.org/debian/ stable-updates main contrib

deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main
    
por Aleksi Väisänen 23.02.2018 / 11:10

1 resposta

1

Para desbloquear apt , você precisará remover o pacote cython :

sudo apt purge cython

Corrigir a instalação cython provavelmente será um pouco mais envolvente (veja os comentários da questão).

    
por 23.02.2018 / 11:47

Tags