종속성 문제 - 종속성이 이미 설치되어 있습니까?

종속성 문제 - 종속성이 이미 설치되어 있습니까?

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.

좋습니다...이것을 수동으로 설치해 보세요 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(단, 이번에는 패키지 제거에 주의하세요. 패키지가 너무 많으면 확인하기 전에 조사하세요).

관련 정보