1

I am trying to install/update things ( php7.0-soap for example) but this message keep appearing.

    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 is also blocked by this one. For now I really need soap, in the future maybe more things. Is there a way to fix this without (or with minimum) impact on the running nginx server, which is usually serving 300-600 users at a time.

We are using : 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

UPDATE Jan 1st 2017:

Using -f in "apt-get dist-upgrade" or "apt-get install" as suggested by @Thomas Ward did make some progress. But I am stuck at :

    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)

I understand what it is saying but have no clue what to do..

2
  • Run a full apt-get update and then apt-get dist-upgrade. Your system wants all the new nginx versions and dependencies as a result of the NGINX PPAs resyncing with Debian, pulling in different dependency sets. Did you try apt-get install -f at all either? That sometimes helps.
    – Thomas Ward
    Dec 31, 2016 at 19:30
  • @ThomasWard : thanks, it did progress but give error, could you let me know what I should do next Jan 1, 2017 at 11:40

1 Answer 1

3

I ended up purge those libnginx-mod-... then purged nginxfull and nginx-common.

Then "dpkg -i --force-overwrite" any file that is in the way. Finally restore nginx config files in /etc/nginx (which I backed up earlier of course).

The server was down for like 5-10 mins... but things are done. Thanks Thomas for helping out

3

Not the answer you're looking for? Browse other questions tagged .