종속됨: nginx-common(= 1.10.1-3+xenial2)이지만 1.10.1-0+xenial0이 설치됩니다.

종속됨: nginx-common(= 1.10.1-3+xenial2)이지만 1.10.1-0+xenial0이 설치됩니다.

설치/업데이트(예: php7.0-soap)를 시도하고 있는데 이 메시지가 계속 나타납니다.

    The following packages have unmet dependencies:
     libnginx-mod-http-auth-pam : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-http-echo : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-http-geoip : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-http-image-filter : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-http-subs-filter : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-http-upstream-fair : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-http-xslt-filter : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-mail : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed
     libnginx-mod-stream : Depends: nginx-common (= 1.10.1-3+xenial2) but 1.10.1-0+xenial0 is to be installed

apt-update도 이에 의해 차단됩니다. 지금 당장은 비누가 꼭 필요하지만, 앞으로는 더 많은 것들이 필요할 것입니다. 일반적으로 한 번에 300-600명의 사용자에게 서비스를 제공하는 실행 중인 nginx 서버에 영향을 주지 않고(또는 최소한으로) 이 문제를 해결할 수 있는 방법이 있습니까?

우리는 Ubuntu 16.04.1 LTS를 사용하고 있습니다.

    lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 16.04.1 LTS
    Release:        16.04
    Codename:       xenial

2017년 1월 1일 업데이트:

제안된 대로 "apt-get dist-upgrade" 또는 "apt-get install"에서 -f를 사용합니다.@토마스 워드어느 정도 진전을 이루었습니다. 하지만 나는 다음에 갇혀 있습니다.

    Unpacking nginx-common (1.10.1-3+xenial2) over (1.10.1-0+xenial0) ...
    dpkg: error processing archive /var/cache/apt/archives/nginx-common_1.10.1-3+xen                                 ial2_all.deb (--unpack):
     trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx 1.                                 11.3-1~xenial
    Preparing to unpack .../nginx-full_1.10.1-3+xenial2_amd64.deb ...
    Unpacking nginx-full (1.10.1-3+xenial2) over (1.10.1-0+xenial0) ...
    dpkg: error processing archive /var/cache/apt/archives/nginx-full_1.10.1-3+xenia                                 l2_amd64.deb (--unpack):
     trying to overwrite '/usr/sbin/nginx', which is also in package nginx 1.11.3-1~                                 xenial
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Preparing to unpack .../init-system-helpers_1.29ubuntu4_all.deb ...
    Unpacking init-system-helpers (1.29ubuntu4) over (1.29ubuntu3) ...
    Processing triggers for man-db (2.7.5-1) ...
    Errors were encountered while processing:
     /var/cache/apt/archives/nginx-common_1.10.1-3+xenial2_all.deb
     /var/cache/apt/archives/nginx-full_1.10.1-3+xenial2_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

무슨 말인지는 알겠는데 어떻게 해야할지 모르겠네요..

답변1

결국 libnginx-mod-...를 제거한 다음 nginxfull 및 nginx-common을 제거했습니다.

그런 다음 방해가 되는 모든 파일을 "dpkg -i --force-overwrite"합니다. 마지막으로 /etc/nginx에서 nginx 구성 파일을 복원합니다(물론 이전에 백업했습니다).

서버가 5~10분 정도 다운됐지만... 모든 일은 끝났습니다. 도와준 토마스에게 감사해요

관련 정보