nginx Troubleshooting Ubuntu 16.04 (problemas de dependência)

1

Tentando instalar um LEMP pela primeira vez sem nenhuma experiência anterior usando este tutorial: Como instalar o Nginx no Ubuntu 16.04

executando o Ubuntu 16.04.1 LTS em uma nova instância (escaleway VPS)

Desde que eu estava recebendo erros, tentei remover e reinstalar o nginx

apt purge nginx
apt autoremove
apt install nginx

mas ainda estou tendo problemas

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)

executando systemctl status 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)

Eu também tentei sudo apt-get instala nginx-full que possui a seguinte saída:

dpkg: error processing package nginx (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 nginx-full
 nginx
    
por Arko 09.01.2017 / 23:42

1 resposta

0

Verifique /var/log/nginx/error.log Pode haver alguma pista para você. Eu tive isso:

2017/02/04 14:55:09 [emergir] 25011 # 25011: mkdir () "/ var / cache / nginx / microcache" falhou (2: Nenhum tal arquivo ou diretório)

Então criei manualmente o subdiretório / var / cache / nginx e executei novamente a instalação e foi bem-sucedida.

    
por Charles Oertel 04.02.2017 / 14:12