Невозможно удалить и установить nginx на человечности

При выполнении sudo apt-get install nginx -y устанавливать nginx. Это перестало работать с ошибкой ниже:-

vinay@vinay-VirtualBox:/etc$ sudo apt-get install nginx -y
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree       
Reading state information... Done
nginx is already the newest version (1.9.15-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nginx-light (1.9.15-0ubuntu1) ...
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 Thu 2017-12-14 16:44:02 IST; 6ms ago
  Process: 23976 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Dec 14 16:44:02 vinay-VirtualBox systemd[1]: Starting A high performance web server and a reverse proxy server...
Dec 14 16:44:02 vinay-VirtualBox nginx[23976]: nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
Dec 14 16:44:02 vinay-VirtualBox nginx[23976]: nginx: configuration file /etc/nginx/nginx.conf test failed
Dec 14 16:44:02 vinay-VirtualBox systemd[1]: nginx.service: Control process exited, code=exited status=1
Dec 14 16:44:02 vinay-VirtualBox systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Dec 14 16:44:02 vinay-VirtualBox systemd[1]: nginx.service: Unit entered failed state.
Dec 14 16:44:02 vinay-VirtualBox systemd[1]: nginx.service: Failed with result 'exit-code'.
dpkg: error processing package nginx-light (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-core (>= 1.9.15-0ubuntu1) | nginx-full (>= 1.9.15-0ubuntu1) | nginx-light (>= 1.9.15-0ubuntu1) | nginx-extras (>= 1.9.15-0ubuntu1); however:
  Package nginx-core is not installed.
  Package nginx-full is not installed.
  Package nginx-light is not configured yet.
  Package nginx-extras is not installed.
 nginx depends on nginx-core (<< 1.9.15-0ubuntu1.1~) | nginx-full (<< 1.9.15-0ubuntu1.1~) | nginx-light (<< 1.9.15-0ubuntu1.1~) | nginx-extras (<< 1.9.15-0ubuntu1.1~); however:
  Package nginx-core is not installed.
  Package nginx-full is not installed.
  Package nginx-light is not configured yet.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 nginx-light
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)

Любые immidiate помогают, стоило бы того.

0
задан 14 December 2017 в 14:18

1 ответ

Если вы правильно прочитаете свою ошибку, вы обнаружите, что есть ключ к решению проблемы. says nginx is already is in its new version, другая часть также упоминает некоторые зависимости.

Это то, что вы можете попробовать.

sudo apt-get update - обновите ваши пакеты

sudo apt-get purge nginx, чтобы удалить все уже установленные части nginx.

sudo apt-get install nginx nginx-core nginx-common наконец, это должно работать.

1
ответ дан 14 December 2017 в 14:18

Другие вопросы по тегам:

Похожие вопросы: