“Sudo apt-get install -f” não corrigirá dependências [fechadas]

1

Estou tentando instalar alguns pacotes com o apt-get, mas ele parece estar preso em algum tipo de loop de dependência.

Li perguntas / respostas semelhantes, mas nenhuma das soluções dadas funciona.

Esta é a saída e as mensagens de erro de apt-get install -f . Parece um problema com python? Algum conselho?

Muito obrigado.

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  cdbs freepats gir1.2-gtksource-3.0 gir1.2-gucharmap-2.90 glib-networking-common gnustep-common gsettings-desktop-schemas gstreamer0.10-plugins-bad gstreamer0.10-x
  html2text libaa1 libao-common libao4 libass4 libaudio2 libavc1394-0 libblas-dev libbz2-dev libcaca0 libcdaudio1 libdc1394-22 libdca0 libdirectfb-1.2-9 libdv4 libdvdnav4
  libdvdread4 libenca0 libfaad2 libflite1 libgail-3-0 libgeoclue0 libgme0 libgraphite3 libgstreamer-plugins-bad0.10-0 libgucharmap-2-90-7 libiec61883-0 libjpeg8-dev
  libkate1 libkpathsea6 liblapack-dev liblcms1 libmhash2 libmimic0 libmms0 libmodplug1 libmpcdec6 libnotify4 libobjc4 libofa0 libopenal-data libopenal1 libopus0
  libpoppler19 libptexenc1 libraptor2-0 librasqal3 libraw1394-11 librdf0 libreadline-dev libshout3 libslv2-9 libsoundtouch0 libspandsp2 libtag1-vanilla libtag1c2a
  libts-0.0-0 libvo-aacenc0 libvo-amrwbenc0 libwavpack1 libwebkitgtk-3.0-common libwildmidi-config libwildmidi1 libxfont1 libyajl2 libyaml-tiny-perl libzbar0 libzvbi-common
  libzvbi0 lmodern luatex notification-daemon tex-common tex-gyre texlive-common texlive-doc-base texlive-fonts-recommended-doc texlive-latex-base-doc
  texlive-latex-recommended-doc texlive-pstricks-doc tsconf ttf-dejavu ttf-freefont ttf-marvosym xfonts-encodings xfonts-utils yelp-xsl zenity-common
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  aspell build-essential dictionaries-common dpkg-dev gir1.2-freedesktop gir1.2-glib-2.0 gobject-introspection ienglish-common ispell libalgorithm-diff-xs-perl
  libapt-pkg-perl libaspell15 libaugeas0 libauthen-pam-perl libbit-vector-perl libbsd-resource-perl libcairo-perl libclass-c3-xs-perl libclass-methodmaker-perl
  libclone-perl libconfig-augeas-perl libconvert-binary-c-perl libcrypt-ssleay-perl libcurses-perl libdata-alias-perl libdate-calc-xs-perl libdbd-mysql-perl libdbd-pg-perl
  libdbd-sqlite3-perl libdbi-perl libdpkg-perl libelfg0 libfcgi-perl libfile-fcntllock-perl libfuse-perl libgd-perl libgirepository-1.0-1 libgirepository1.0-dev
  libglib-perl libglib2.0-0 libglib2.0-bin libglib2.0-dev libio-pty-perl liblocale-gettext-perl libtext-iconv-perl patch perl-base python python-gi python-gi-cairo
Suggested packages:
  aspell-doc spellutils debian-keyring spell augeas-tools libfont-freetype-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libunix-mknod-perl liblchown-perl
  libfilesys-statvfs-perl libgirepository1.0-doc diffutils-doc python-doc python-tk
Recommended packages:
  iamerican iamerican-small iamerican-large iamerican-huge iamerican-insane ibritish ibritish-small ibritish-large ibritish-huge ibritish-insane xdg-user-dirs
The following packages will be REMOVED:
  libgd-gd2-perl
The following NEW packages will be installed:
  aspell build-essential dictionaries-common dpkg-dev ienglish-common ispell libdpkg-perl libelfg0 libgd-perl libio-pty-perl libtext-iconv-perl
The following packages will be upgraded:
  gir1.2-freedesktop gir1.2-glib-2.0 gobject-introspection libalgorithm-diff-xs-perl libapt-pkg-perl libaspell15 libaugeas0 libauthen-pam-perl libbit-vector-perl
  libbsd-resource-perl libcairo-perl libclass-c3-xs-perl libclass-methodmaker-perl libclone-perl libconfig-augeas-perl libconvert-binary-c-perl libcrypt-ssleay-perl
  libcurses-perl libdata-alias-perl libdate-calc-xs-perl libdbd-mysql-perl libdbd-pg-perl libdbd-sqlite3-perl libdbi-perl libfcgi-perl libfile-fcntllock-perl libfuse-perl
  libgirepository-1.0-1 libgirepository1.0-dev libglib-perl libglib2.0-0 libglib2.0-bin libglib2.0-dev liblocale-gettext-perl patch perl-base python python-gi
  python-gi-cairo
39 upgraded, 11 newly installed, 1 to remove and 1067 not upgraded.
14 not fully installed or removed.
Need to get 0 B/17.7 MB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Reading changelogs... Done
Extracting templates from packages: 100%
Preconfiguring packages ...
 dict-common::dc_set: dictionaries-common/default-ispell is already set to
      [american (American English)]. Preserving it.
 dict-common::dc_set: dictionaries-common/default-wordlist is already set to
      [american (American English)]. Preserving it.
Setting up python-minimal (2.7.9-1) ...
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
    import struct
  File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
    from _struct import *
ImportError: No module named _struct
dpkg: error processing package python-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT: Como sugerido eu tentei usar o apt-get para reinstalar o python-minimal e obter os seguintes erros

sudo apt-get install --reinstall python2.7-minimal
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libalgorithm-diff-xs-perl : Depends: perlapi-5.14.2
 libapt-pkg-perl : Depends: perlapi-5.14.2
 libbit-vector-perl : Depends: perlapi-5.14.2
 libbsd-resource-perl : Depends: perlapi-5.14.2
 libcairo-perl : Depends: perlapi-5.14.2
 libclass-c3-xs-perl : Depends: perlapi-5.14.2
 libclass-methodmaker-perl : Depends: perlapi-5.14.2
 libclone-perl : Depends: perlapi-5.14.2
 libconfig-augeas-perl : Depends: perlapi-5.14.2
 libconvert-binary-c-perl : Depends: perlapi-5.14.2
 libcrypt-ssleay-perl : Depends: perlapi-5.14.2
 libcurses-perl : Depends: perlapi-5.14.2
 libdata-alias-perl : Depends: perlapi-5.14.2
 libdate-calc-xs-perl : Depends: perlapi-5.14.2
 libdbd-mysql-perl : Depends: perlapi-5.14.2
 libdbd-pg-perl : Depends: perlapi-5.14.2
 libdbd-sqlite3-perl : Depends: perlapi-5.14.2
 libdbi-perl : Depends: perlapi-5.14.2
 libfcgi-perl : Depends: perlapi-5.14.2
 libfile-fcntllock-perl : Depends: perlapi-5.14.2
 libfuse-perl : Depends: perlapi-5.14.2
 libgd-gd2-perl : Depends: perlapi-5.14.2
 libglib-perl : Depends: perlapi-5.14.2
 liblocale-gettext-perl : PreDepends: perlapi-5.14.2
 python : Depends: python-minimal (= 2.7.3-4+deb7u1) but 2.7.9-1 is to be installed
 python-dev : Depends: python (= 2.7.9-1) but 2.7.3-4+deb7u1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 aspell-en : Depends: aspell (>= 0.60.3-2) but it is not installed
             Depends: dictionaries-common (>= 0.49.2) but it is not installed
 iamerican : Depends: dictionaries-common but it is not installed
             Depends: ienglish-common (= 3.3.02-6) but it is not installed
             Depends: ispell but it is not installed
 ibritish : Depends: dictionaries-common but it is not installed
            Depends: ienglish-common (= 3.3.02-6) but it is not installed
            Depends: ispell but it is not installed
 libalgorithm-diff-xs-perl : Depends: perlapi-5.14.2
 libapt-pkg-perl : Depends: perlapi-5.14.2
 libbit-vector-perl : Depends: perlapi-5.14.2
 libbsd-resource-perl : Depends: perlapi-5.14.2
 libcairo-perl : Depends: perlapi-5.14.2
 libclass-c3-xs-perl : Depends: perlapi-5.14.2
 libclass-methodmaker-perl : Depends: perlapi-5.14.2
 libclone-perl : Depends: perlapi-5.14.2
 libconfig-augeas-perl : Depends: perlapi-5.14.2
 libconvert-binary-c-perl : Depends: perlapi-5.14.2
 libcrypt-ssleay-perl : Depends: perlapi-5.14.2
 libcurses-perl : Depends: perlapi-5.14.2
 libdata-alias-perl : Depends: perlapi-5.14.2
 libdate-calc-xs-perl : Depends: perlapi-5.14.2
 libdbd-mysql-perl : Depends: perlapi-5.14.2
 libdbd-pg-perl : Depends: perlapi-5.14.2
 libdbd-sqlite3-perl : Depends: perlapi-5.14.2
 libdbi-perl : Depends: perlapi-5.14.2
 libfcgi-perl : Depends: perlapi-5.14.2
 libfile-fcntllock-perl : Depends: perlapi-5.14.2
 libfuse-perl : Depends: perlapi-5.14.2
 libgd-gd2-perl : Depends: perlapi-5.14.2
 libglib-perl : Depends: perlapi-5.14.2
 liblocale-gettext-perl : PreDepends: perlapi-5.14.2
 python : Depends: python-minimal (= 2.7.3-4+deb7u1) but 2.7.9-1 is installed
 python-dev : Depends: python (= 2.7.9-1) but 2.7.3-4+deb7u1 is installed
E: Unmet dependencies. Try using -f.
    
por darigand 11.07.2016 / 12:31

2 respostas

1

A última linha do seu sources.list aponta para Jessie.

Wheezy foi o lançamento estável anterior do Debian, Jessie é a atual. E Wheezy agora só recebe poucas atualizações.

Quando você acabou de executar apt-get install <package> , ele tentará instalar a versão mais recente que puder encontrar (a menos que você tenha alguma configuração de pinagem, mas se tiver, você deve saber sobre isso e saber o suficiente sobre como o apt funciona nunca acabei onde você está, então eu acho que é seguro assumir que você não tem), que quase sempre será de Jessie, mas instalar os pacotes do Jessie no Wheezy está pedindo por problemas.

Como todas as linhas, mas o último ponto para um espelho na Irlanda, e a última linha apontam para nós, sugere que você possa tê-lo adicionado sem saber totalmente o que estava fazendo? Tenha cuidado e leia um pouco sobre a manutenção de um sistema debian.

Como você provavelmente já tem pacotes Jessie em seu sistema, o único caminho sensato é atualizar para Jessie. Há muitos guias on-line, mas resumindo:

  • Altere wheezy para jessie em todos os lugares em /etc/apt/sources.list
  • Executar apt-get update
  • Executar apt-get dist-upgrade

Ao editar sources.list , basta remover a última linha.

    
por 11.07.2016 / 14:35
1

Parece que o problema foi ter uma versão local do python instalada. Eu consegui rodar o apt-get -f depois de remover a instalação local do python e 'manualmente' instalar o python-minimal com o dpkg. Obrigado a todos pela sua contribuição.

    
por 11.07.2016 / 14:39

Tags