nginx安装报错

谁知道是哪里的问题呢?

root@iZbp1167an2zlk2ruh6t4gZ:/# sudo apt-get install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
nginx is already the newest version (1.10.3-0ubuntu0.16.04.3).
0 upgraded, 0 newly installed, 0 to remove and 194 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.3) ...
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 Mon 2019-05-06 13:33:40 CST; 12ms ago
  Process: 6961 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

May 06 13:33:40 iZbp1167an2zlk2ruh6t4gZ systemd[1]: Starting A high performance web server and a reverse proxy server...
May 06 13:33:40 iZbp1167an2zlk2ruh6t4gZ nginx[6961]: nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
May 06 13:33:40 iZbp1167an2zlk2ruh6t4gZ nginx[6961]: nginx: configuration file /etc/nginx/nginx.conf test failed
May 06 13:33:40 iZbp1167an2zlk2ruh6t4gZ systemd[1]: nginx.service: Control process exited, code=exited status=1
May 06 13:33:40 iZbp1167an2zlk2ruh6t4gZ systemd[1]: Failed to start A high performance web server and a reverse proxy server.
May 06 13:33:40 iZbp1167an2zlk2ruh6t4gZ systemd[1]: nginx.service: Unit entered failed state.
May 06 13:33:40 iZbp1167an2zlk2ruh6t4gZ systemd[1]: nginx.service: Failed with result 'exit-code'.
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.3) | nginx-full (>= 1.10.3-0ubuntu0.16.04.3) | nginx-light (>= 1.10.3-0ubuntu0.16.04.3) | nginx-extras (>= 1.10.3-0ubuntu0.16.04.3); 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.3.1~) | nginx-full (<< 1.10.3-0ubuntu0.16.04.3.1~) | nginx-light (<< 1.10.3-0ubuntu0.16.04.3.1~) | nginx-extras (<< 1.10.3-0ubuntu0.16.04.3.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 unconfigured
Errors were encountered while processing:
 nginx-core
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
阅读 2.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题