我收到类似以下错误nginx 升级到 16.04 服务器后更新失败:我无法安装nginx
。按照该问题的答案,我已经完成了
sudo apt-get remove nginx nginx-common
然后当我尝试
sudo apt-get install nginx
我明白了
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)
导致此错误的原因可能是什么?