debian 8.3中的Nginx安装错误 设置nginx full(1.6.2-5+deb8u1)。。。 nginx.service的作业失败。有关详细信息,请参阅“systemctl status nginx.service”和“journalctl-xn”。 调用rc.d:initscript nginx,操作“启动”失败。 dpkg:错误处理包nginx full(--configure): 安装的子进程安装后脚本返回错误退出状态1 dpkg:依赖性问题阻止了nginx的配置: nginx取决于nginx full(>=1.6.2-5+deb8u1)| nginx light(>=1.6.2-5+deb8u1)| nginx extras(>=1.6.2-5+deb8u1);然而: 尚未配置包nginx full。 未安装包nginx灯。 未安装包nginx extras。 nginx取决于nginx full(

debian 8.3中的Nginx安装错误 设置nginx full(1.6.2-5+deb8u1)。。。 nginx.service的作业失败。有关详细信息,请参阅“systemctl status nginx.service”和“journalctl-xn”。 调用rc.d:initscript nginx,操作“启动”失败。 dpkg:错误处理包nginx full(--configure): 安装的子进程安装后脚本返回错误退出状态1 dpkg:依赖性问题阻止了nginx的配置: nginx取决于nginx full(>=1.6.2-5+deb8u1)| nginx light(>=1.6.2-5+deb8u1)| nginx extras(>=1.6.2-5+deb8u1);然而: 尚未配置包nginx full。 未安装包nginx灯。 未安装包nginx extras。 nginx取决于nginx full(,nginx,debian,Nginx,Debian,对我有帮助: Setting up nginx-full (1.6.2-5+deb8u1) ... Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details. invoke-rc.d: initscript nginx, action "start" failed. dpkg: error processing package nginx-full (--

对我有帮助:

Setting up nginx-full (1.6.2-5+deb8u1) ...
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' 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.6.2-5+deb8u1) | nginx-light (>= 1.6.2-5+deb8u1) | nginx-extras (>= 1.6.2-5+deb8u1); 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.6.2-5+deb8u1.1~) | nginx-light (<< 1.6.2-5+deb8u1.1~) | nginx-extras (<< 1.6.2-5+deb8u1.1~); 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
Processing triggers for libc-bin (2.19-18+deb8u3) ...
Processing triggers for systemd (215-17+deb8u3) ...
Errors were encountered while processing:
 nginx-full
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)

您没有发布
systemctl status nginx.service
的输出,因此这可能不对,但我遇到了这个问题,因为我忘记了以前安装的nginx

因此,我清除了nginx并重新安装:

service apache2 stop
apt-get remove apache2*
apt-get autoremove
然后我收到了另一个错误,得到了详细信息:
systemctl status nginx.service

就我而言

nginx:[emerg]bind()到[:]:80失败(98:地址已在使用)

因此,我有另一个web服务器在端口80上侦听

为了修复,我编辑了默认的nginx站点
nano/etc/nginx/sites available/default
,并删除了端口80上的侦听

我只需要SSL,所以:

    apt-get purge nginx-full nginx-common
    apt-get install nginx-full
我也有同样的问题。 我没有Apache,没有其他东西阻塞我的端口80。 我无法使用安装nginx

    server {
        listen 443 ssl;
        //rest of config....
    }
也没有

sudo apt-get install nginx
一周后,我无意中发现了这个小博客:

在本博客中,解决方案是:

  • 安装nginx common:
    sudo apt get安装nginx common
  • /etc/nginx/sites enabled/default中删除
    listen[:]:80 default_server;
    (我使用root用户进行了此操作)
  • 为了确定,我确实重新启动了服务器
  • 为了确保两次,我做了
    sudo-apt-get-update
    ,然后
    sudo-apt-get-upgrade
  • 现在我终于调用了
    sudo apt get install nginx full
    ,它成功了

  • 之后,当我输入远程服务器的IP时,我可以看到nginx的标题屏幕!

    在ubuntu16 Amazon EC2实例上安装nginx时,我遇到了类似的问题,原因似乎是我在安全组设置下篡改了入站端口 理想情况下,它们应该是: 超文本传输协议 传输控制协议 80 0.0.0.0/0 及

    HTTP 传输控制协议 80 ::/0


    由于某种原因,我错误地删除了其中一个。看来,当我修复所有内容都已排序时

    我只需运行第一行即可为Information解决问题。非常感谢您的支持。我按照与您类似的Electronic的回答解决了问题。感谢您的支持:)
    sudo apt-get install nginx-common nginx-full