依存関係の問題 - 依存関係はすでにインストールされていますか?

依存関係の問題 - 依存関係はすでにインストールされていますか?

mysql-server正確に言えば、壊れたようなパッケージをインストールしようとしています。インターネットのアドバイスに従って依存関係apt-get -f installを変更するために実行し、変更のリストを作成しました。

私は見ずに変更を受け入れました。明らかに、これらの変更は多くの重要なパッケージを削除するために行われました。

Log started: 2017-12-21  12:41:04
(Reading database ... 111077 files and directories currently installed.)
Removing php5 (5.6.30+dfsg-0+deb8u1) ...
Removing libapache2-mod-php5 (5.6.30+dfsg-0+deb8u1) ...
php5_invoke prerm: Disable module pdo for apache2 SAPI
php5_invoke prerm: Disable module opcache for apache2 SAPI
php5_invoke prerm: Disable module readline for apache2 SAPI
php5_invoke prerm: Disable module json for apache2 SAPI
Module php5 disabled.
apache2_invoke prerm: Disable module php5
Removing apache2 (2.4.10-10+deb8u9) ...
Removing apache2-bin (2.4.10-10+deb8u9) ...
Removing node (0.3.2-7.4) ...
Removing ax25-node (0.3.2-7.4) ...
Removing build-essential (11.7) ...
Removing dpkg-dev (1.17.27) ...
Removing git (1:2.1.4-2.1+deb8u3) ...
Removing i2c-tools (3.1.1+svn-2) ...
Removing libsoftware-license-perl (0.103010-3) ...
Removing libdata-section-perl (0.200006-1) ...
Removing libmro-compat-perl (0.12-1) ...
Removing libclass-c3-perl (0.26-1) ...
Removing libalgorithm-c3-perl (0.09-1) ...
Removing libalgorithm-diff-xs-perl (0.04-3+b1) ...
Removing libalgorithm-merge-perl (0.08-2) ...
Removing libalgorithm-diff-perl (1.19.02-3) ...
Removing libarchive-extract-perl (0.72-1) ...
Removing libcgi-fast-perl (1:2.04-1) ...
Removing libcgi-pm-perl (4.09-1) ...
Removing libclass-c3-xs-perl (0.13-2+b1) ...
Removing libmodule-build-perl (0.421000-2+deb8u1) ...
Removing 'diversion of /usr/bin/config_data to /usr/bin/config_data.diverted by libmodule-build-perl'
Removing 'diversion of /usr/share/man/man1/config_data.1.gz to /usr/share/man/man1/config_data.diverted.1.gz by libmodule-build-perl'
Removing libcpan-meta-perl (2.142690-1) ...
Removing libsub-exporter-perl (0.986-1) ...
Removing libdata-optlist-perl (0.109-1) ...
Removing libdpkg-perl (1.17.27) ...
Removing liberror-perl (0.17-1.1) ...
Removing libfcgi-perl (0.77-1+deb8u1) ...
Removing openbsd-inetd (0.20091229-2) ...
Removing update-inetd (4.43) ...
Removing libfile-copy-recursive-perl (0.38-1) ...
Removing libfile-fcntllock-perl (0.22-1+b1) ...
Removing libterm-ui-perl (0.42-1) ...
Removing liblog-message-simple-perl (0.10-2) ...
Removing liblog-message-perl (0.8-1) ...
Removing libmodule-pluggable-perl (5.1-1) ...
Removing libmodule-signature-perl (0.73-1+deb8u2) ...
Removing libpackage-constants-perl (0.04-1) ...
Removing libparams-util-perl (1.07-2+b1) ...
Removing php5-readline (5.6.30+dfsg-0+deb8u1) ...
php5_invoke prerm: Disable module readline for cli SAPI
Removing php5-cli (5.6.30+dfsg-0+deb8u1) ...
php5_invoke prerm: Disable module pdo for cli SAPI
php5_invoke prerm: Disable module opcache for cli SAPI
php5_invoke prerm: Disable module json for cli SAPI
Removing php5-json (1.3.6-1) ...
Removing php5-common (5.6.30+dfsg-0+deb8u1) ...
Removing lsof (4.86+dfsg-1) ...
Removing libperl4-corelibs-perl (0.003-1) ...
Removing libpod-latex-perl (0.61-1) ...
Removing 'diversion of /usr/bin/pod2latex to /usr/bin/pod2latex.bundled by libpod-latex-perl'
Removing 'diversion of /usr/share/man/man1/pod2latex.1.gz to /usr/share/man/man1/pod2latex.bundled.1.gz by libpod-latex-perl'
Removing libpod-readme-perl (0.11-1) ...
Removing libregexp-common-perl (2013031301-1) ...
Removing libsub-install-perl (0.928-1) ...
Removing libtext-soundex-perl (3.4-1+b2) ...
Removing libtext-template-perl (1.46-1) ...
Removing libtimedate-perl (2.3000-2) ...
Removing rename (0.20-3) ...
Removing xml-core (0.13+nmu2) ...
Removing sgml-base (1.26+nmu4) ...

それ以来、私はこのパッケージを再インストールしようとしてきました。ただし、これにより奇妙な状況が発生します...をインストールしようとすると、次のことが起こりますapache2。たとえば、次のようになります。

root@srv2:/# apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2 : Depends: apache2-mpm-worker (= 2.2.22-13+deb7u12) but it is not going to be installed or
                    apache2-mpm-prefork (= 2.2.22-13+deb7u12) but it is not going to be installed or
                    apache2-mpm-event (= 2.2.22-13+deb7u12) but it is not going to be installed or
                    apache2-mpm-itk (= 2.2.22-13+deb7u12) but it is not going to be installed
           Depends: apache2.2-common (= 2.2.22-13+deb7u12) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

OK...これを手動でインストールしてみてくださいapache2.2-common。たとえば、次のようになります。

root@srv2:/# apt-get install apache2.2-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2.2-common : Depends: apache2.2-bin (= 2.2.22-13+deb7u12) but it is not going to be installed
                    Depends: perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

「によって異なります:perl」は、多くのパッケージが報告する問題です。ところですでにインストールされているようですが..

root@srv2:/# perl -v

This is perl 5, version 20, subversion 2 (v5.20.2) built for arm-linux-gnueabihf-thread-multi-64int

(95の登録済みパッチがあります。詳細については、perl -Vを参照してください。)

aptに移動します。インストールされていないようです。

root@srv2:/# apt-get install perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 adduser : Depends: perl-base (>= 5.6.0) but it is not going to be installed
           Depends: passwd (>= 1:4.0.12) but it is not going to be installed
           Depends: debconf but it is not going to be installed or
                    debconf-2.0
 libfontconfig1 : Depends: fontconfig-config (>= 2.11.0-6.3+deb8u1) but it is not going to be installed
 libpython3-stdlib : Depends: libpython3.4-stdlib (>= 3.4.2-0) but it is not going to be installed
 libxt6 : Depends: libsm6 but it is not going to be installed
 logrotate : Depends: cron or
                      anacron but it is not going to be installed or
                      cron-daemon
             Recommends: mailx
 perl : Depends: perl-base (= 5.14.2-21+rpi2+deb7u2) but it is not going to be installed
        Depends: perl-modules (>= 5.14.2-21+rpi2+deb7u2) but it is not going to be installed
 python : Depends: python2.7 (>= 2.7.9-1~) but it is not going to be installed
          Depends: libpython-stdlib (= 2.7.9-1) but it is not going to be installed
 python3-minimal : Depends: python3.4-minimal (>= 3.4.2-0) but it is not going to be installed
 python3-venv : Depends: python3.4-venv (>= 3.4.2-0) but it is not going to be installed
 python3.4 : Depends: python3.4-minimal (= 3.4.2-1) but it is not going to be installed
             Depends: libpython3.4-stdlib (= 3.4.2-1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

このパッケージは実際にインストールされており、aptはそれを知っています。パッケージはadduser実際にはサーバーにインストールされますが、満たされていない依存関係として報告されます。これらの問題により、削除されたパッケージの回復を開始することもできません。

追加情報:

root@srv2:/# apt-get install adduser
Reading package lists... Done
Building dependency tree       
Reading state information... Done
adduser is already the newest version.

root@srv2:/# apt-mark showhold
root@srv2:/# apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
  -1 http://archive.raspberrypi.org/debian/ jessie/ui armhf Packages
     release o=Raspberry Pi Foundation,a=oldstable,n=jessie,l=Raspberry Pi Foundation,c=ui
     origin archive.raspberrypi.org
  -1 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages
     release o=Raspberry Pi Foundation,a=oldstable,n=jessie,l=Raspberry Pi Foundation,c=main
     origin archive.raspberrypi.org
 989 http://archive.raspbian.org/raspbian/ wheezy/non-free armhf Packages
     release v=7.0,o=Raspbian,a=oldoldstable,n=wheezy,l=Raspbian,c=non-free
     origin archive.raspbian.org
 989 http://archive.raspbian.org/raspbian/ wheezy/contrib armhf Packages
     release v=7.0,o=Raspbian,a=oldoldstable,n=wheezy,l=Raspbian,c=contrib
     origin archive.raspbian.org
 989 http://archive.raspbian.org/raspbian/ wheezy/main armhf Packages
     release v=7.0,o=Raspbian,a=oldoldstable,n=wheezy,l=Raspbian,c=main
     origin archive.raspbian.org
Pinned packages:

ベストアンサー1

一部のパッケージはRaspbian Jessieからインストールされますが、固定優先順位(in /etc/apt/preferences)はRaspbian Wheezyを優先し、Jessieから新しいパッケージがインストールされるのを防ぎます(例:-1優先順位)。そのため、削除したパッケージを再インストールするには除外されたJessieパッケージが必要なため、再インストールすることはできません。

この問題を解決するには、次の手順を実行する必要があります。

  1. Jessieがリストされていますが、-1に固定されている理由を学びます。
  2. 妥当な理由がない場合は、編集/etc/apt/preferencesして削除してください。
  3. 削除したパッケージを復元します。

また、以下を使用してある時点でJessieに完全にアップグレードしたい場合がありますapt dist-upgrade(ただし、今回はパッケージの削除に注意してください。パッケージが多すぎる場合は、確認する前に調査してください)。

おすすめ記事