Не удалось удалить & amp; установить nginx на ubuntu

При запуске 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)

Любая быстрая помощь стоила бы этого.

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

2 ответа

Если вы правильно прочитали свою ошибку, вы обнаружите, что есть ключи к решению проблемы. [!].

Это то, что вы можете попробовать. удалите все части nginx, которые уже установлены.

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

1
ответ дан 18 July 2018 в 01:12

Если вы правильно прочитали свою ошибку, вы обнаружите, что есть ключи к решению проблемы. [!].

Это то, что вы можете попробовать. удалите все части nginx, которые уже установлены.

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

1
ответ дан 24 July 2018 в 17:21

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

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