升级 nginx 时出错

升级 nginx 时出错

我有一台 ubuntu 服务器,在这台服务器上我安装了 gitlab,出于必要,我必须更新 nginx 才能运行其他应用程序!但是当我执行 apt-get upgrade 时,会出现此错误吗?(我在网上搜索了解决方法,但暂时没有找到任何方法)

错误:

sudo apt-get install nginx --configure
E: Command line option --configure is not understood in combination with the oth                  er options
root@ubuntudev:/home/riccardo# dpkg: error processing package nginx (--configure):
bash: syntax error near unexpected token `('
root@ubuntudev:/home/riccardo#  dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup erro                  r from a previous failure.
                          Errors were encountered while processing:
 nginx-core
 nginx
dependency: command not found

错误:(尝试 apt-get upgrade -f)

apt-get upgrade -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up nginx-core (1.10.3-0ubuntu0.16.04.2) ...
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.
â nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2018-01-09 08:18:24 CET; 4ms ago
  Process: 16180 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
  Process: 16176 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)

Jan 09 08:18:21 ubuntudev nginx[16180]: nginx: [emerg] bind() to 0.0.0.0:80 ...)
Jan 09 08:18:22 ubuntudev nginx[16180]: nginx: [emerg] bind() to 0.0.0.0:80 ...)
Jan 09 08:18:22 ubuntudev nginx[16180]: nginx: [emerg] bind() to 0.0.0.0:80 ...)
Jan 09 08:18:23 ubuntudev nginx[16180]: nginx: [emerg] bind() to 0.0.0.0:80 ...)
Jan 09 08:18:23 ubuntudev nginx[16180]: nginx: [emerg] bind() to 0.0.0.0:80 ...)
Jan 09 08:18:24 ubuntudev nginx[16180]: nginx: [emerg] still could not bind()
Jan 09 08:18:24 ubuntudev systemd[1]: nginx.service: Control process exited...=1
Jan 09 08:18:24 ubuntudev systemd[1]: Failed to start A high performance we...r.
Jan 09 08:18:24 ubuntudev systemd[1]: nginx.service: Unit entered failed state.
Jan 09 08:18:24 ubuntudev systemd[1]: nginx.service: Failed with result 'ex...'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package nginx-core (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-core (>= 1.10.3-0ubuntu0.16.04.2) | nginx-full (>= 1.10.3-0ubuntu0.16.04.2) | nginx-light (>= 1.10.3-0ubuntu0.16.04.2) | nginx-extras (>= 1.10.3-0ubuntu0.16.04.2); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-core (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-full (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-light (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-extras (<< 1.10.3-0ubuntu0.16.04.2.1~); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

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

相关内容