第一次尝试安装LEMP,而之前没有使用本教程的经验:如何在Ubuntu 16.04上安装Nginx
在新实例上运行Ubuntu16.04.1 LTS (scaleway VPS)
由于我有错误,所以我尝试删除和重新安装nginx。
apt purge nginx
apt autoremove
apt install nginx但我还是有问题
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-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 installed.
Package nginx-full is not configured yet.
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 installed.
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
Errors were encountered while processing:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)运行systemctl状态nginx.service:
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-01-09 22:20:18 UTC; 5min ago
Process: 15561 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)我还尝试过sudo apt install nginx-full,它有以下输出:
dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
nginx-full
nginx发布于 2017-02-04 13:12:32
检查/var/log/nginx/error.log,那里可能有一些线索。我有这样的经历:
因此,我手动创建了/var/cache/nginx子目录,并重新运行了安装,它成功了。
https://askubuntu.com/questions/870004
复制相似问题