1

I'm getting an error similar to nginx fails to update after upgrade to 16.04 server: I'm unable to install nginx. Following the answer to that question, I've already done

sudo apt-get remove nginx nginx-common

Then when I try

sudo apt-get install nginx

I get

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic linux-headers-4.4.0-53
  linux-headers-4.4.0-53-generic linux-image-4.4.0-51-generic
  linux-image-4.4.0-53-generic linux-image-extra-4.4.0-51-generic
  linux-image-extra-4.4.0-53-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnginx-mod-http-auth-pam libnginx-mod-http-echo libnginx-mod-http-geoip
  libnginx-mod-http-image-filter libnginx-mod-http-subs-filter
  libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter
  libnginx-mod-mail libnginx-mod-stream nginx-common nginx-full
Suggested packages:
  fcgiwrap nginx-doc
The following NEW packages will be installed:
  libnginx-mod-http-auth-pam libnginx-mod-http-echo libnginx-mod-http-geoip
  libnginx-mod-http-image-filter libnginx-mod-http-subs-filter
  libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter
  libnginx-mod-mail libnginx-mod-stream nginx nginx-common nginx-full
0 upgraded, 12 newly installed, 0 to remove and 66 not upgraded.
Need to get 0 B/786 kB of archives.
After this operation, 1996 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 542522 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.10.1-3+xenial2_all.deb ...
Unpacking nginx-common (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-http-auth-pam.
Preparing to unpack .../libnginx-mod-http-auth-pam_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-http-auth-pam (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-http-echo.
Preparing to unpack .../libnginx-mod-http-echo_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-http-echo (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-http-geoip.
Preparing to unpack .../libnginx-mod-http-geoip_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-http-geoip (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-http-image-filter.
Preparing to unpack .../libnginx-mod-http-image-filter_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-http-subs-filter.
Preparing to unpack .../libnginx-mod-http-subs-filter_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-http-subs-filter (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-http-upstream-fair.
Preparing to unpack .../libnginx-mod-http-upstream-fair_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-http-upstream-fair (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-http-xslt-filter.
Preparing to unpack .../libnginx-mod-http-xslt-filter_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-mail.
Preparing to unpack .../libnginx-mod-mail_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-mail (1.10.1-3+xenial2) ...
Selecting previously unselected package libnginx-mod-stream.
Preparing to unpack .../libnginx-mod-stream_1.10.1-3+xenial2_amd64.deb ...
Unpacking libnginx-mod-stream (1.10.1-3+xenial2) ...
Selecting previously unselected package nginx-full.
Preparing to unpack .../nginx-full_1.10.1-3+xenial2_amd64.deb ...
Unpacking nginx-full (1.10.1-3+xenial2) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.10.1-3+xenial2_all.deb ...
Unpacking nginx (1.10.1-3+xenial2) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu12) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nginx-common (1.10.1-3+xenial2) ...
Setting up libnginx-mod-http-auth-pam (1.10.1-3+xenial2) ...
Setting up libnginx-mod-http-echo (1.10.1-3+xenial2) ...
Setting up libnginx-mod-http-geoip (1.10.1-3+xenial2) ...
Setting up libnginx-mod-http-image-filter (1.10.1-3+xenial2) ...
Setting up libnginx-mod-http-subs-filter (1.10.1-3+xenial2) ...
Setting up libnginx-mod-http-upstream-fair (1.10.1-3+xenial2) ...
Setting up libnginx-mod-http-xslt-filter (1.10.1-3+xenial2) ...
Setting up libnginx-mod-mail (1.10.1-3+xenial2) ...
Setting up libnginx-mod-stream (1.10.1-3+xenial2) ...
Setting up nginx-full (1.10.1-3+xenial2) ...
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-full (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-full (<< 1.10.1-3+xenial2.1~) | nginx-light (<< 1.10.1-3+xenial2.1~) | nginx-extras (<< 1.10.1-3+xenial2.1~); however:
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-full (>= 1.10.1-3+xenial2) | nginx-light (>= 1.10.1-3+xenial2) | nginx-extras (>= 1.10.1-3+xenial2); however:
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 nginx-full
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)

What could be the cause of this error?

4
  • have you tried sudo apt-get -f install Jan 12, 2017 at 10:57
  • Yes, I've tried sudo apt-get -f install nginx, but I get the same error message.
    – Kurt Peek
    Jan 16, 2017 at 15:31
  • have you tried sudo apt-get -f install without the nginx part as i have found that if you do not specify a package then it works better at solving unresolved/broken dependancies Jan 16, 2017 at 17:03
  • 1
    Did you bother following the suggested steps to check the output of systemctl status -l nginx.service to see why it failed to start?
    – Thomas Ward
    Sep 9, 2017 at 18:46

0

Browse other questions tagged .