我尝试在我的ubuntu 16.04中的另一个用户中安装ssh
但是我收到了这个错误:
After this operation, 99.3 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ssh all 1:7.2p2-4ubuntu2.1 [7,070 B]
Fetched 7,070 B in 2s (2,659 B/s)
Selecting previously unselected package ssh.
(Reading database ... 244468 files and directories currently installed.)
Preparing to unpack .../ssh_1%3a7.2p2-4ubuntu2.1_all.deb ...
Unpacking ssh (1:7.2p2-4ubuntu2.1) ...
Setting up nginx-core (1.10.0-0ubuntu0.16.04.4) ...
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-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.0-0ubuntu0.16.04.4) | nginx-full (>= 1.10.0-0ubuntu0.16.04.4) | nginx-light (>= 1.10.0-0ubuntu0.16.04.4) | nginx-extras (>= 1.10.0-0ubuntu0.16.04.4); 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.0-0ubuntu0.16.04.4.1~) | nginx-full (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-light (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-extras (<< 1.10.0-0ubuntu0.16.04.4.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
Setting up ssh (1:7.2p2-4ubuntu2.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
任何帮助都将不胜感激。
答案 0 :(得分:0)
在我的情况下,原因是
-- Unit nginx.service has begun starting up.
Oct 31 22:04:33 alexeymiller nginx[14157]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Oct 31 22:04:33 alexeymiller nginx[14157]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Oct 31 22:04:34 alexeymiller nginx[14157]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Oct 31 22:04:34 alexeymiller nginx[14157]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Oct 31 22:04:35 alexeymiller nginx[14157]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Oct 31 22:04:35 alexeymiller nginx[14157]: nginx: [emerg] still could not bind()
Oct 31 22:04:35 alexeymiller systemd[1]: nginx.service: Control process exited, code=exited status=1
Oct 31 22:04:35 alexeymiller systemd[1]: Failed to start A high performance web server and a reverse proxy server.
可能你安装了使用80端口的apache2。 删除apache2然后重试。
答案 1 :(得分:0)
如果您不需要安装apache 2,请将其删除
sudo apt-get remove apache2
sudo service nginx restart
答案 2 :(得分:0)
您可能需要查看
var headerItem = "x-requested-with"
event.headers[headerItem]
服务Apache2停止 服务nginx开始