ошибка в установке nginx

Я пытаюсь установить nginx, но я получил эту ошибку.

ahmed@ahmed-Inspiron-5537:~$ sudo apt-get install nginx
[sudo] password for ahmed: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nginx is already the newest version (1.10.3-1ubuntu3).
The following packages were automatically installed and are no longer required:
  linux-headers-4.10.0-19 linux-headers-4.10.0-19-generic
  linux-image-4.10.0-19-generic linux-image-extra-4.10.0-19-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nginx-core (1.10.3-1ubuntu3) ...
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 Fri 2017-06-09 15:49:00 +04; 10ms ago
     Docs: man:nginx(8)
  Process: 13214 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
  Process: 13202 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      CPU: 26ms

يون 09 15:48:58 ahmed-Inspiron-5537 nginx[13214]: nginx: [emerg] …e)
يون 09 15:48:59 ahmed-Inspiron-5537 nginx[13214]: nginx: [emerg] …e)
يون 09 15:48:59 ahmed-Inspiron-5537 nginx[13214]: nginx: [emerg] …e)
يون 09 15:48:59 ahmed-Inspiron-5537 nginx[13214]: nginx: [emerg] …e)
يون 09 15:48:59 ahmed-Inspiron-5537 nginx[13214]: nginx: [emerg] …e)
يون 09 15:49:00 ahmed-Inspiron-5537 nginx[13214]: nginx: [emerg] …()
يون 09 15:49:00 ahmed-Inspiron-5537 systemd[1]: nginx.service: Co…=1
يون 09 15:49:00 ahmed-Inspiron-5537 systemd[1]: Failed to start A…r.
يون 09 15:49:00 ahmed-Inspiron-5537 systemd[1]: nginx.service: Un…e.
يون 09 15:49:00 ahmed-Inspiron-5537 systemd[1]: nginx.service: Fa…'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package nginx-core (--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.3-1ubuntu3.1~) | nginx-full (<< 1.10.3-1ubuntu3.1~) | nginx-light (<< 1.10.3-1ubuntu3.1~) | nginx-extras (<< 1.10.3-1ubuntu3.1~); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-core (>= 1.10.3-1ubuntu3) | nginx-full (>= 1.10.3-1ubuntu3) | nginx-light (>= 1.10.3-1ubuntu3) | nginx-extras (>= 1.10.3-1ubuntu3); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  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-core
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
0
задан 9 June 2017 в 04:57

2 ответа

Можно также попробовать путем выполнения следующей команды:

  1. Добираются, список всех пакетов Nginx установил

    dpkg -l | grep nginx
    
  2. , Удаляют все пакеты для nginx путем выполнения следующей команды:

    apt-get --purge autoremove nginx-* 
    

    или

    apt-get --purge autoremove <packages listed in ouput of 1>
    

вышеупомянутые команды удалят все зависимости Nginx. В дополнение к той проверке, если /var/lib/nginx и /etc/nginx удалены или нет. Если это не удалено, удалил каталоги путем выполнения следующей команды:

rm -rf /var/lib/nginx /etc/nginx
1
ответ дан 3 November 2019 в 02:51

ahmed@ahmed-Inspiron-5537:~ $ sudo склонный - получают пароль nginx
[sudo] установки для ahmed:
списки пакета Чтения... Сделанный
дерево зависимостей Здания
Чтение указывают информацию... Сделанный
nginx уже является новейшей (1.10.3-1ubuntu3) версией.
следующие пакеты были автоматически установлены и больше не требуются:
и тому подобное

Это также говорит:

2 не полностью установленный или удаленный.

, Таким образом, необходимо попробовать:

sudo apt purge nginx

И затем:

sudo apt install nginx

Путем выполнения этого Вы полностью удаляете nginx и затем переустанавливаете его.

Сообщенный мне, если это работает :),
Wessel

0
ответ дан 3 November 2019 в 02:51

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

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