「Sudo apt-get install -f」は依存関係を変更しません。

「Sudo apt-get install -f」は依存関係を変更しません。

apt-getを使っていくつかのパッケージをインストールしようとしていますが、ある種の依存関係ループにかかっているようです。

同様の質問/回答を読みましたが、提供された解決策のどれも効果がありませんでした。

以下は出力とエラーメッセージですapt-get install -f。 Pythonの問題だと思いますか?どんな提案がありますか?

とても感謝しています。

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)

編集:提案されているように、apt-getを使用してpython-minimalを再インストールしようとしましたが、次のエラーが発生しました。

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.

ベストアンサー1

最後の行はsources.listJesseを指します。

WheezyはDebianの最後の安定版で、Jessieは現在のバージョンです。そしてWheezyは現在非常に少ないアップデートしか受けていません。

ただ実行すると、見つかったapt-get install <package>最新バージョンをインストールしようとします(固定設定を指定しない限り、そうする場合はこれを知っておく必要があり、aptのしくみを十分に理解する必要があります。はい、そうでないと仮定するのは安全だと思います)。ほとんど常に Jessie で提供されますが、Wh​​eezy に Jessie パッケージをインストールすると問題が発生する可能性があります。

最後の行を除くすべての項目はアイルランドのミラーを指し、最後の行はアメリカを指します。注意深く Debian システムのメンテナンスに関するいくつかの単語をお読みください。

システムにすでにJessieパッケージがある可能性があるため、唯一の合理的なアプローチはJessieにアップグレードすることです。オンラインにはたくさんのガイドがありますが、簡単に言うと次のようになります。

  • 次のいずれかwheezyに変更してください。jessie/etc/apt/sources.list
  • 走るapt-get update
  • 走るapt-get dist-upgrade

編集時にsources.list最後の行を削除するだけです。

おすすめ記事