dpkg está em um loop de dependência não resolvido

1

Corri apt-get build-dep wine1.6 , porque queria instalar wine , mas apt install wine1.6 disse que muitos pacotes não foram instalados.

Depois que as dependências de construção foram baixadas, dpkg retornou um erro porque isdnlog não pôde ser configurado. Eu corri dpkg --configure -a , que deu algo semelhante ao seguinte, que é a saída resultante de apt install -f (TL; DR apenas muitas muitas dependências):

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
33 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python-scour (0.26-3ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-scour (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of cdbs:
 cdbs depends on python-scour; however:
  Package python-scour is not configured yet.

dpkg: error processing package cdbs (--configure):
 dependency problems - leaving unconfigured
Setting up dblatex (0.3.5-2) ...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN... 
mktexlsr: Done.
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package dblatex (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-libarchive-c (2.1-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-libarchive-c (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-magic (1:5.22+15-2ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-magic (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-rpm (4.12.0.1+dfsg1-3build2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-rpm (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of diffoscope:
 diffoscope depends on python-libarchive-c; however:
  Package python-libarchive-c is not configured yet.
 diffoscope depends on python-magic; however:
  Package python-magic is not configured yet.
 diffoscope depends on python-rpm; however:
  Package python-rpm is not configured yet.

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

dpkg: error processing package debbindiff (--configure):
 dependency problems - leaving unconfigured
Setting up python-wstools (0.4.3-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wstools (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-defusedxml (0.4.1-2build1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-defusedxml (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-soappy:
 python-soappy depends on python-wstools; however:
  Package python-wstools is not configured yet.
 python-soappy depends on python-defusedxml; however:
  Package python-defusedxml is not configured yet.

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

dpkg: error processing package python-debianbts (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-reportbug:
 python-reportbug depends on python-debianbts (>= 1.13); however:
  Package python-debianbts is not configured yet.

dpkg: error processing package python-reportbug (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of reportbug:
 reportbug depends on python-reportbug (= 6.6.5ubuntu1); however:
  Package python-reportbug is not configured yet.

dpkg: error processing package reportbug (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of debian-el:
 debian-el depends on reportbug (>= 4.12); however:
  Package reportbug is not configured yet.

dpkg: error processing package debian-el (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dpkg-dev-el:
 dpkg-dev-el depends on debian-el (>= 33.2); however:
  Package debian-el is not configured yet.

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

dpkg: error processing package devscripts-el (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-pkg-tools:
 gnome-pkg-tools depends on python-scour; however:
  Package python-scour is not configured yet.

dpkg: error processing package gnome-pkg-tools (--configure):
 dependency problems - leaving unconfigured
Setting up libglib2.0-dev (2.46.2-1ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package libglib2.0-dev (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libgstreamer0.10-dev:
 libgstreamer0.10-dev depends on libglib2.0-dev; however:
  Package libglib2.0-dev is not configured yet.

dpkg: error processing package libgstreamer0.10-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgstreamer-plugins-base0.10-dev:
 libgstreamer-plugins-base0.10-dev depends on libgstreamer0.10-dev (>= 0.10.36); however:
  Package libgstreamer0.10-dev is not configured yet.
 libgstreamer-plugins-base0.10-dev depends on libglib2.0-dev; however:
  Package libglib2.0-dev is not configured yet.

dpkg: error processing package libgstreamer-plugins-base0.10-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpulse-dev:amd64:
 libpulse-dev:amd64 depends on libglib2.0-dev; however:
  Package libglib2.0-dev is not configured yet.

dpkg: error processing package libpulse-dev:amd64 (--configure):
 dependency problems - leaving unconfigured
Setting up python-apipkg (1.0-1.1build1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-apipkg (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-execnet:
 python-execnet depends on python-apipkg; however:
  Package python-apipkg is not configured yet.

dpkg: error processing package python-execnet (--configure):
 dependency problems - leaving unconfigured
Setting up python-funcsigs (0.4-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-funcsigs (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-py (1.4.30-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-py (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-pytest:
 python-pytest depends on python-py (>= 1.4.29); however:
  Package python-py is not configured yet.

dpkg: error processing package python-pytest (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-pytest-xdist:
 python-pytest-xdist depends on python-execnet (>= 1.0.9); however:
  Package python-execnet is not configured yet.
 python-pytest-xdist depends on python-py; however:
  Package python-py is not configured yet.
 python-pytest-xdist depends on python-pytest; however:
  Package python-pytest is not configured yet.

dpkg: error processing package python-pytest-xdist (--configure):
 dependency problems - leaving unconfigured
Setting up python-urwid (1.2.1-2build1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-urwid (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up isdnlog (1:3.25+dfsg1-3.5ubuntu1) ...
Job for isdnutils-base.service failed because the control process exited with error code. See "systemctl status isdnutils-base.service" and "journalctl -xe" for details.
invoke-rc.d: initscript isdnutils-base, action "reload" failed.
dpkg: error processing package isdnlog (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-pbr (1.8.0-2ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in 
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in 
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pbr (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-mock:
 python-mock depends on python-funcsigs; however:
  Package python-funcsigs is not configured yet.
 python-mock depends on python-pbr; however:
  Package python-pbr is not configured yet.

dpkg: error processing package python-mock (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of rpmlint:
 rpmlint depends on python-rpm; however:
  Package python-rpm is not configured yet.

dpkg: error processing package rpmlint (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-scour
 cdbs
 dblatex
 python-libarchive-c
 python-magic
 python-rpm
 diffoscope
 debbindiff
 python-wstools
 python-defusedxml
 python-soappy
 python-debianbts
 python-reportbug
 reportbug
 debian-el
 dpkg-dev-el
 devscripts-el
 gnome-pkg-tools
 libglib2.0-dev
 libgstreamer0.10-dev
 libgstreamer-plugins-base0.10-dev
 libpulse-dev:amd64
 python-apipkg
 python-execnet
 python-funcsigs
 python-py
 python-pytest
 python-pytest-xdist
 python-urwid
 isdnlog
 python-pbr
 python-mock
 rpmlint

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

Cada execução subseqüente de qualquer um desses comandos ou instalação de pacotes mencionados como necessários, apenas aumenta a lista de pacotes que podem ser desinstalados.

Já tive meu quinhão de desentendimentos com apt no passado, mas isso é diferente de tudo que já encontrei. Como posso resolver isso?

    
por cat 02.01.2016 / 04:34

3 respostas

3

Verifique se existe um link simbólico de / usr / bin / python para /usr/bin/python3.x. Se houver, remova o link simbólico e revincule para /usr/bin/python2.7

$ sudo ln -s /usr/bin/python2.7 /usr/bin/python
    
por N.Keseci 10.08.2016 / 18:30
2

Este problema é sobre conflito de versões ou configurações em python. Por favor, tente os seguintes comandos que funcionam para o meu caso:

sudo apt-get purge python python3 

E então

sudo apt-get clean
# sudo apt-get autoremove -f 
sudo apt-get update

sudo apt-get install python python3

Após esses dois comandos, o ambiente é corrigido e você pode fazer qualquer outra coisa com sudo apt-get . Por favor, tenha cuidado, isso irá remotamente o seu ambiente python.

    
por Yushan Zhang 21.07.2017 / 05:34
1

Você tem um problema com ConfigParser , pois a mensagem de erro informa que não foi possível carregar.

$ locate ConfigParser
/usr/lib/python2.7/ConfigParser.py
/usr/lib/python2.7/ConfigParser.pyc
/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeConfigParser.py
/usr/lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradeConfigParser.cpython-34.pyc

$ dpkg -S /usr/lib/python2.7/ConfigParser.py
libpython2.7-minimal:amd64: /usr/lib/python2.7/ConfigParser.py

Como na situação atual, pode ser que você não possa reinstalá-lo usando apt .

  1. Fazer o download do libpython2.7-minimal corresponde ao seu arco de sistema de:

    link

    (Espero que você esteja usando astuto para a versão dos pacotes na saída que você forneceu. Se você estiver usando outra versão, selecione a correta no canto superior direito)

  2. Abra-o com o gerenciador de arquivos → novamente data.tar.gz

  3. Extrair /usr/lib/python2.7/ConfigParser.py
  4. Em seguida, mova o caminho da instalação

    sudo mv ~/Downloads/ConfigParser.py /usr/lib/python2.7/ConfigParser.py
    
  5. Corrigir seu dono

    sudo chown root:root /usr/lib/python2.7/ConfigParser.py
    
  6. Tente novamente com sudo dpkg --configure -a para concluir a instalação anterior.

por user.dz 02.01.2016 / 07:21