1
2
здравствуйте, уважаемые участники.
на голом впс я ставлю nginx+apache…. и уже выполнил давно команду:
apt-get install nginx
он дал ошибки, и после этого не ставятся пакеты, например этот:
# apt-get install libapache2-mod-rpaf
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия libapache2-mod-rpaf.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
не установлено до конца или удалено 2 пакетов.
После данной операции, объём занятого дискового пространства возрастёт на 0 B.
Хотите продолжить? [Д/н] y
Настраивается пакет nginx-full (1.6.2-5) …
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: ошибка при обработке пакета nginx-full (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-full (>= 1.6.2-5) | nginx-light (>= 1.6.2-5) | nginx-extras (>= 1.6.2-5), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-full (<< 1.6.2-5.1~) | nginx-light (<< 1.6.2-5.1~) | nginx-extras (<< 1.6.2-5.1~), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
я нигде не нашел и все советы в рунете становятся нерабочими с этой ошибкой.
Поставил на ноут ubuntu 15.04 минут 40 назад.
Начал ставить всё нужное мне, ставлю nginx и получаю ошибку:
Такая же проблема и при установке mariadb-server.
Кстати, удалить nginx так же не получается:
Как исправить и какова причина проблемы?
-
Вопрос заданболее трёх лет назад
-
689 просмотров
rm /var/cache/debconf/*.dat
apt-get clean
apt-get autoclean
apt-get autoremove
apt-get -f install
Отсюда
Пригласить эксперта
sudo apt-get -f install
sudo apt-get install --fix-missing
Вопрос первый: зачем ставить 15.04, если её поддержка полностью прекратится через полтора-два месяца?
Ставьте 15.10, как последнюю актуальную версию.
Так же уточняйте, не подключали ли вы ещё какие-то кривые сторонние репозитории, и скачивали ли Ubuntu с сайта ubuntu.com, а не непонятно какую версию непонятно откуда?
-
Показать ещё
Загружается…
27 июн. 2023, в 14:02
5000 руб./за проект
27 июн. 2023, в 14:01
30000 руб./за проект
27 июн. 2023, в 13:17
1000 руб./за проект
Минуточку внимания
Установил nginx и после настройки /etc/nginx/sites-available/default «что-то пошло не так» и я решил вернуть все в первоначальное состояние вернув исходный код. Но ничего не изменилось. Тогда я удалил nginx и начал ставить заново.
sudo apt-get remove nginx
sudo apt-get install nginx
Но установка завершается с ошибкой —
ivan@pc:~$ sudo apt-get autoremove nginx
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Пакеты, которые будут УДАЛЕНЫ:
nginx
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 1 пакетов, и 1 пакетов не обновлено.
не установлено до конца или удалено 2 пакетов.
После данной операции, объём занятого дискового пространства уменьшится на 53,2 kB.
Хотите продолжить? [Д/н] Д
(Чтение базы данных … на данный момент установлен 191831 файл и каталог.)
Удаляется nginx (1.9.3-1ubuntu1) …
Настраивается пакет nginx-core (1.9.3-1ubuntu1) …
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: ошибка при обработке пакета nginx-core (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
При обработке следующих пакетов произошли ошибки:
nginx-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
ivan@pc:~$ sudo apt-get install nginx
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
НОВЫЕ пакеты, которые будут установлены:
nginx
обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 1 пакетов не обновлено.
не установлено до конца или удалено 1 пакетов.
Необходимо скачать 0 B/3.540 B архивов.
После данной операции, объём занятого дискового пространства возрастёт на 53,2 kB.
Выбор ранее не выбранного пакета nginx.
(Чтение базы данных … на данный момент установлено 191829 файлов и каталогов.)
Подготовка к распаковке …/nginx_1.9.3-1ubuntu1_all.deb …
Распаковывается nginx (1.9.3-1ubuntu1) …
Настраивается пакет nginx-core (1.9.3-1ubuntu1) …
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: ошибка при обработке пакета nginx-core (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-core (>= 1.9.3-1ubuntu1) | nginx-full (>= 1.9.3-1ubuntu1) | nginx-light (>= 1.9.3-1ubuntu1) | nginx-extras (>= 1.9.3-1ubuntu1), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-core (<< 1.9.3-1ubuntu1.1~) | nginx-full (<< 1.9.3-1ubuntu1.1~) | nginx-light (<Отчёты apport не записаны, так как сообщение об ошибке указывает на повторную ошибку от предыдущего отказа.
< 1.9.3-1ubuntu1.1~) | nginx-extras (<< 1.9.3-1ubuntu1.1~), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
ivan@pc:~$ sudo apt-get install nginx
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия nginx.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 1 пакетов не обновлено.
не установлено до конца или удалено 2 пакетов.
После данной операции, объём занятого дискового пространства возрастёт на 0 B.
Хотите продолжить? [Д/н] Д
Настраивается пакет nginx-core (1.9.3-1ubuntu1) …
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: ошибка при обработке пакета nginx-core (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-core (>= 1.9.3-1ubuntu1) | nginx-full (>= 1.9.3-1ubuntu1) | nginx-light (>= 1.9.3-1ubuntu1) | nginx-extras (>= 1.9.3-1ubuntu1), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-core (<< 1.9.3-1ubuntu1.1~) | nginx-full (<< 1.9.3-1ubuntu1.1~) | nginx-light (<< 1.9.3-1ubuntu1.1~) | nginx-extras (<< 1.9.3-1ubuntu1.1~), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
Отчёты apport не записаны, так как сообщение об ошибке указывает на повторную ошибку от предыдущего отказа.
При обработке следующих пакетов произошли ошибки:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
ivan@pc:~$
Что теперь делать? У меня xubuntu.
1
2
здравствуйте, уважаемые участники.
на голом впс я ставлю nginx+apache…. и уже выполнил давно команду:
apt-get install nginx
он дал ошибки, и после этого не ставятся пакеты, например этот:
# apt-get install libapache2-mod-rpaf
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия libapache2-mod-rpaf.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
не установлено до конца или удалено 2 пакетов.
После данной операции, объём занятого дискового пространства возрастёт на 0 B.
Хотите продолжить? [Д/н] y
Настраивается пакет nginx-full (1.6.2-5) …
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: ошибка при обработке пакета nginx-full (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-full (>= 1.6.2-5) | nginx-light (>= 1.6.2-5) | nginx-extras (>= 1.6.2-5), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-full (<< 1.6.2-5.1~) | nginx-light (<< 1.6.2-5.1~) | nginx-extras (<< 1.6.2-5.1~), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
я нигде не нашел и все советы в рунете становятся нерабочими с этой ошибкой.
Установил nginx и после настройки /etc/nginx/sites-available/default «что-то пошло не так» и я решил вернуть все в первоначальное состояние вернув исходный код. Но ничего не изменилось. Тогда я удалил nginx и начал ставить заново.
sudo apt-get remove nginx
sudo apt-get install nginx
Но установка завершается с ошибкой —
ivan@pc:~$ sudo apt-get autoremove nginx
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Пакеты, которые будут УДАЛЕНЫ:
nginx
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 1 пакетов, и 1 пакетов не обновлено.
не установлено до конца или удалено 2 пакетов.
После данной операции, объём занятого дискового пространства уменьшится на 53,2 kB.
Хотите продолжить? [Д/н] Д
(Чтение базы данных … на данный момент установлен 191831 файл и каталог.)
Удаляется nginx (1.9.3-1ubuntu1) …
Настраивается пакет nginx-core (1.9.3-1ubuntu1) …
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: ошибка при обработке пакета nginx-core (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
При обработке следующих пакетов произошли ошибки:
nginx-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
ivan@pc:~$ sudo apt-get install nginx
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
НОВЫЕ пакеты, которые будут установлены:
nginx
обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 1 пакетов не обновлено.
не установлено до конца или удалено 1 пакетов.
Необходимо скачать 0 B/3.540 B архивов.
После данной операции, объём занятого дискового пространства возрастёт на 53,2 kB.
Выбор ранее не выбранного пакета nginx.
(Чтение базы данных … на данный момент установлено 191829 файлов и каталогов.)
Подготовка к распаковке …/nginx_1.9.3-1ubuntu1_all.deb …
Распаковывается nginx (1.9.3-1ubuntu1) …
Настраивается пакет nginx-core (1.9.3-1ubuntu1) …
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: ошибка при обработке пакета nginx-core (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-core (>= 1.9.3-1ubuntu1) | nginx-full (>= 1.9.3-1ubuntu1) | nginx-light (>= 1.9.3-1ubuntu1) | nginx-extras (>= 1.9.3-1ubuntu1), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-core (<< 1.9.3-1ubuntu1.1~) | nginx-full (<< 1.9.3-1ubuntu1.1~) | nginx-light (<Отчёты apport не записаны, так как сообщение об ошибке указывает на повторную ошибку от предыдущего отказа.
< 1.9.3-1ubuntu1.1~) | nginx-extras (<< 1.9.3-1ubuntu1.1~), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
ivan@pc:~$ sudo apt-get install nginx
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия nginx.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 1 пакетов не обновлено.
не установлено до конца или удалено 2 пакетов.
После данной операции, объём занятого дискового пространства возрастёт на 0 B.
Хотите продолжить? [Д/н] Д
Настраивается пакет nginx-core (1.9.3-1ubuntu1) …
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: ошибка при обработке пакета nginx-core (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-core (>= 1.9.3-1ubuntu1) | nginx-full (>= 1.9.3-1ubuntu1) | nginx-light (>= 1.9.3-1ubuntu1) | nginx-extras (>= 1.9.3-1ubuntu1), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-core (<< 1.9.3-1ubuntu1.1~) | nginx-full (<< 1.9.3-1ubuntu1.1~) | nginx-light (<< 1.9.3-1ubuntu1.1~) | nginx-extras (<< 1.9.3-1ubuntu1.1~), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
Отчёты apport не записаны, так как сообщение об ошибке указывает на повторную ошибку от предыдущего отказа.
При обработке следующих пакетов произошли ошибки:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
ivan@pc:~$
Что теперь делать? У меня xubuntu.
Здравствуйте, господа. На Debian Jessie пытаюсь установить Nginx:
[!] root@Atom at / >:/ aptitude install nginx
Следующие НОВЫЕ пакеты будут установлены:
nginx{b}
0 пакетов обновлено, 1 установлено новых, 0 пакетов отмечено для удаления, и 0 пакетов не обновлено.
Необходимо получить 72,6 kB архивов. После распаковки 102 kB будет занято.
Следующие пакеты имеют неудовлетворённые зависимости:
nginx : Зависит: nginx-full (>= 1.6.2-5+deb8u4) но его установка не запланирована. или
nginx-light (>= 1.6.2-5+deb8u4) но его установка не запланирована. или
nginx-extras (>= 1.6.2-5+deb8u4) но его установка не запланирована.
Зависит: nginx-full (< 1.6.2-5+deb8u4.1~) но его установка не запланирована. или
nginx-light (< 1.6.2-5+deb8u4.1~) но его установка не запланирована. или
nginx-extras (< 1.6.2-5+deb8u4.1~) но его установка не запланирована.
Следующие действия разрешат зависимости:
Установить следующие пакеты:
1) nginx-common [1.6.2-5+deb8u4 (proposed-updates, stable)]
2) nginx-full [1.6.2-5+deb8u4 (proposed-updates, stable)]
Принять данное решение? [Y/n/q/?] Y
Следующие НОВЫЕ пакеты будут установлены:
nginx nginx-common{a} nginx-full{a}
0 пакетов обновлено, 3 установлено новых, 0 пакетов отмечено для удаления, и 0 пакетов не обновлено.
Необходимо получить 591 kB архивов. После распаковки 1 413 kB будет занято.
Хотите продолжить? [Y/n/?] Y
Получить: 1 http://security.debian.org/ jessie/updates/main nginx-common all 1.6.2-5+deb8u4 [88,1 kB]
Получить: 2 http://security.debian.org/ jessie/updates/main nginx-full amd64 1.6.2-5+deb8u4 [430 kB]
Получить: 3 http://security.debian.org/ jessie/updates/main nginx all 1.6.2-5+deb8u4 [72,6 kB]
Получено 591 kБ в 0с (633 kБ/с)
Предварительная настройка пакетов ...
Выбор ранее не выбранного пакета nginx-common.
(Чтение базы данных … на данный момент установлено 42882 файла и каталога.)
Подготовка к распаковке …/nginx-common_1.6.2-5+deb8u4_all.deb …
Распаковывается nginx-common (1.6.2-5+deb8u4) …
Выбор ранее не выбранного пакета nginx-full.
Подготовка к распаковке …/nginx-full_1.6.2-5+deb8u4_amd64.deb …
Распаковывается nginx-full (1.6.2-5+deb8u4) …
Выбор ранее не выбранного пакета nginx.
Подготовка к распаковке …/nginx_1.6.2-5+deb8u4_all.deb …
Распаковывается nginx (1.6.2-5+deb8u4) …
Обрабатываются триггеры для systemd (215-17+deb8u5) …
Обрабатываются триггеры для man-db (2.7.0.2-5) …
Настраивается пакет nginx-common (1.6.2-5+deb8u4) …
Настраивается пакет nginx-full (1.6.2-5+deb8u4) …
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: ошибка при обработке пакета nginx-full (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-full (>= 1.6.2-5+deb8u4) | nginx-light (>= 1.6.2-5+deb8u4) | nginx-extras (>= 1.6.2-5+deb8u4), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-full (<< 1.6.2-5+deb8u4.1~) | nginx-light (<< 1.6.2-5+deb8u4.1~) | nginx-extras (<< 1.6.2-5+deb8u4.1~), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
Обрабатываются триггеры для systemd (215-17+deb8u5) …
При обработке следующих пакетов произошли ошибки:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Настраивается пакет nginx-full (1.6.2-5+deb8u4) …
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: ошибка при обработке пакета nginx-full (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-full (>= 1.6.2-5+deb8u4) | nginx-light (>= 1.6.2-5+deb8u4) | nginx-extras (>= 1.6.2-5+deb8u4), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-full (<< 1.6.2-5+deb8u4.1~) | nginx-light (<< 1.6.2-5+deb8u4.1~) | nginx-extras (<< 1.6.2-5+deb8u4.1~), однако:
Пакет nginx-full пока не настроен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (--configure):
проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
nginx-full
nginx
Нарываюсь на ошибку. В чём неправ? Как вылечить?
Using Linux Mint 18.3
when I had nginx installed which was running well.
I needed to uninstall it for some reason, and I uninstall it using command:
sudo apt purge nginx -y
sudo rm -rf /etc/nginx
sudo apt autoremove
then when I need it later again, I tried:
sudo apt install nginx -y
it says me following error:
here are all the lines from terminal:
sudo apt install nginx -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
nginx-common nginx-core
Suggested packages:
fcgiwrap nginx-doc
The following NEW packages will be installed:
nginx nginx-common nginx-core
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/458 kB of archives.
After this operation, 1,482 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 235105 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.10.3-0ubuntu0.16.04.2_all.deb ...
Unpacking nginx-common (1.10.3-0ubuntu0.16.04.2) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../nginx-core_1.10.3-0ubuntu0.16.04.2_amd64.deb ...
Unpacking nginx-core (1.10.3-0ubuntu0.16.04.2) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.10.3-0ubuntu0.16.04.2_all.deb ...
Unpacking nginx (1.10.3-0ubuntu0.16.04.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Setting up nginx-common (1.10.3-0ubuntu0.16.04.2) ...
Setting up nginx-core (1.10.3-0ubuntu0.16.04.2) ...
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 Tue 2018-05-29 22:56:08 +06; 18ms ago
Process: 2929 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
May 29 22:56:08 ahs-pc systemd[1]: Starting A high performance web server a.....
May 29 22:56:08 ahs-pc nginx[2929]: nginx: [emerg] open() "/etc/nginx/nginx...y)
May 29 22:56:08 ahs-pc nginx[2929]: nginx: configuration file /etc/nginx/ng...ed
May 29 22:56:08 ahs-pc systemd[1]: nginx.service: Control process exited, c...=1
May 29 22:56:08 ahs-pc systemd[1]: Failed to start A high performance web s...r.
May 29 22:56:08 ahs-pc systemd[1]: nginx.service: Unit entered failed state.
May 29 22:56:08 ahs-pc systemd[1]: nginx.service: Failed with result 'exit-...'.
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-0ubuntu0.16.04.2) | nginx-full (>= 1.10.3-0ubuntu0.16.04.2) | nginx-light (>= 1.10.3-0ubuntu0.16.04.2) | nginx-extras (>= 1.10.3-0ubuntu0.16.04.2); 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-0ubuntu0.16.04.2.1~) | nginx-full (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-light (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-extras (<< 1.10.3-0ubuntu0.16.04.2.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.
dpkg: error processing package nginx (--configure):
dependency problems - leaving No apport report written because the error message indicates its a followup error from a previous failure.
unconfigured
Errors were encountered while processing:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
I’ve tried force install also, like bellow:
sudo apt install -f nginx
but throws the same error!
:~$ sudo apt-get remove nginx* && sudo apt-get install nginx-full* Reading package lists... Done Building dependency tree Reading state information... Done After this operation, 5,579 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 nginx-full-dbg amd64 1.10.0-0ubuntu0.16.04.1 [3,789 kB] Fetched 3,789 kB in 33s (112 kB/s) Selecting previously unselected package nginx-common. (Reading database ... 189767 files and directories currently installed.) Preparing to unpack .../nginx-common_1.10.0-0ubuntu0.16.04.1_all.deb ... Unpacking nginx-common (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full. Preparing to unpack .../nginx-full_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full-dbg. Preparing to unpack .../nginx-full-dbg_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full-dbg (1.10.0-0ubuntu0.16.04.1) ... Processing triggers for ufw (0.35-0ubuntu1) ... Rules updated for profile 'Apache Full' Rules updated for profile 'Nginx HTTP' Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for man-db (2.7.5-1) ... Setting up nginx-common (1.10.0-0ubuntu0.16.04.1) ... Setting up nginx-full (1.10.0-0ubuntu0.16.04.1) ... 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-full-dbg: nginx-full-dbg depends on nginx-full (= 1.10.0-0ubuntu0.16.04.1); however: Package nginx-full is not configured yet. dpkg: error processing package nginx-full-dbg (--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-full nginx-full-dbg E: Sub-process /usr/bin/dpkg returned an error code (1)
asked Apr 28, 2016 at 9:42
12
Shutting down apache2 first before installing nginx should fix this problem:
sudo service apache2 stop
answered Jun 18, 2016 at 1:01
Andrew ChanAndrew Chan
1,4811 gold badge7 silver badges3 bronze badges
5
Andrew Chan provided the right answer for me. To extend his answer a bit, here’s what you can do on the commandline;
stop apache2
sudo systemctl stop apache2.service
prevent apache2 to start at boot
sudo systemctl disable apache2.service
Reinstall nginx
sudo apt-get install nginx
answered Jul 31, 2016 at 14:45
1
In my case the error is the server has IPv6 disabled.
Solution:
Edit /etc/nginx/sites-enabled/default
and comment IPv6 out:
listen [::]:80 default_server;
Reinstall nginx:
apt purge nginx
apt autoremove
apt install nginx
Videonauth
32.6k16 gold badges102 silver badges119 bronze badges
answered Jun 2, 2016 at 9:28
3
I just had this issue, but the solution was slightly different.
Once I solved a simple site misconfiguration, I was able to update nginx.
Check your nginx error log:
sudo cat /var/log/nginx/error.log|less
Then try again:
sudo apt-get update;sudo apt-get upgrade
answered Jan 16, 2017 at 4:30
TaigerTaiger
991 silver badge2 bronze badges
1
In my case nothing helped at all, except of this:
sudo fuser -k 80/tcp
service nginx start
answered Apr 18, 2019 at 9:16
mansimmansim
1213 bronze badges
When I checked /var/log/nginx/error.log I saw that the installer was unable to open /var/cache/nginx/microcache
A directory listing showed there was no /var/cache/nginx directory, so I created it and the install succeeded.
answered Feb 4, 2017 at 13:08
Before the installation remove any manually added symlinks from /sites-enabled
.
answered Jun 14, 2018 at 11:19
1
In my case it has been a misconfigurated file in /etc/nginx/sites-enabled/
I named them as .old files, but that does not matter. They will be readed and may prevend an successfull installation or start of that service.
Be careful with files in that folder and read your error output carefully as discribed by @Taiger
answered Nov 20, 2018 at 20:22
I see you want to reinstall Nginx, but we can have the same error when we have Nginx run in Docker container.
In this case, just look at started containers:
user@host:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
f4ee2264d5fb docker_nginx "nginx -g 'daemon of…" 5 months ago Up 2 days 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp nginx
Just stop it with CONTAINER ID
docker stop f4ee2264d5fb
Then you are able to install Nginx
answered Mar 8, 2020 at 19:09
sudo apt-get install nginx
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Будут установлены следующие дополнительные пакеты:
nginx-common nginx-core
Предлагаемые пакеты:
fcgiwrap nginx-doc
НОВЫЕ пакеты, которые будут установлены:
nginx nginx-common nginx-core
обновлено 0, установлено 3 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Необходимо скачать 418 kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 1 363 kB.
Хотите продолжить? [Д/н] y
Получено:1 http://ru.archive.ubuntu.com/ubuntu/ vivid-updates/main nginx-common all 1.6.2-5ubuntu3.1 [20,5 kB]
Получено:2 http://ru.archive.ubuntu.com/ubuntu/ vivid-updates/main nginx-core i386 1.6.2-5ubuntu3.1 [394 kB]
Получено:3 http://ru.archive.ubuntu.com/ubuntu/ vivid-updates/main nginx all 1.6.2-5ubuntu3.1 [3 550 B]
Получено 418 kБ за 2с (183 kБ/c)
Выбор ранее не выбранного пакета nginx-common.
(Чтение базы данных … на данный момент установлено 163000 файлов и каталогов.)
Подготовка к распаковке …/nginx-common_1.6.2-5ubuntu3.1_all.deb …
Распаковывается nginx-common (1.6.2-5ubuntu3.1) …
Выбор ранее не выбранного пакета nginx-core.
Подготовка к распаковке …/nginx-core_1.6.2-5ubuntu3.1_i386.deb …
Распаковывается nginx-core (1.6.2-5ubuntu3.1) …
Выбор ранее не выбранного пакета nginx.
Подготовка к распаковке …/nginx_1.6.2-5ubuntu3.1_all.deb …
Распаковывается nginx (1.6.2-5ubuntu3.1) …
Обрабатываются триггеры для man-db (2.7.0.2-5) …
Обрабатываются триггеры для ufw (0.34~rc-0ubuntu5) …
Обрабатываются триггеры для systemd (219-7ubuntu6) …
Обрабатываются триггеры для ureadahead (0.100.0-19) …
Настраивается пакет nginx-common (1.6.2-5ubuntu3.1) …
Обрабатываются триггеры для ufw (0.34~rc-0ubuntu5) …
Настраивается пакет nginx-core (1.6.2-5ubuntu3.1) …
Job for nginx.service failed. See «systemctl status nginx.service» and «journalctl -xe» for details.
invoke-rc.d: initscript nginx, action «start» failed.
dpkg: ошибка при обработке пакета nginx-core (—configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет nginx:
nginx зависит от nginx-core (>= 1.6.2-5ubuntu3.1) | nginx-full (>= 1.6.2-5ubuntu3.1) | nginx-light (>= 1.6.2-5ubuntu3.1) | nginx-extras (>= 1.6.2-5ubuntu3.1), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
nginx зависит от nginx-core (<< 1.6.2-5ubuntu3.1.1~) | nginx-full (<< 1.6.2-5ubuntu3.1.1~) | nginx-light (<< 1.6.2-5ubuntu3.1.1~) | nginx-extras (<< 1.6.2-5ubuntu3.1.1~), однако:
Пакет nginx-core пока не настроен.
Пакет nginx-full не установлен.
Пакет nginx-light не установлен.
Пакет nginx-extras не установлен.
dpkg: ошибка при обработке пакета nginx (—configure):
проблемы завОтчёты apport не записаны, так как сообщение об ошибке указывает на повторную ошибку от предыдущего отказа.
исимостей — оставляем не настроенным
Обрабатываются триггеры для systemd (219-7ubuntu6) …
Обрабатываются триггеры для ureadahead (0.100.0-19) …
При обработке следующих пакетов произошли ошибки:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Package
DistroRelease: Ubuntu 15.04
Package: nginx-core 1.6.2-5ubuntu3.1
ProcVersionSignature: Ubuntu 3.19.0-31.36-generic 3.19.8-ckt7
Uname: Linux 3.19.0-31-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.17.2-0ubuntu1.7
Architecture: i386
Date: Mon Nov 2 14:21:03 2015
ErrorMessage: подпроцесс установлен сценарий post-installation возвратил код ошибки 1
RelatedPackageVersions:
dpkg 1.17.25ubuntu1
apt 1.0.9.7ubuntu4.2
SourcePackage: nginx
Title: package nginx-core 1.6.2-5ubuntu3.1 failed to install/upgrade: подпроцесс установлен сценарий post-installation возвратил код ошибки 1
UpgradeStatus: No upgrade log present (probably fresh install)
# apt-get install nginx-extras Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Следующие пакеты устанавливались автоматически и больше не требуются: dbconfig-common javascript-common libapparmor1 libjs-jquery libjs-sphinxdoc libjs-underscore php-gettext php-tcpdf php5-curl php5-gd php5-mcrypt php5-mysql Для их удаления используйте «apt-get autoremove». Будут установлены следующие дополнительные пакеты: libluajit-5.1-2 libluajit-5.1-common nginx-common Предлагаемые пакеты: fcgiwrap nginx-doc НОВЫЕ пакеты, которые будут установлены: libluajit-5.1-2 libluajit-5.1-common nginx-common nginx-extras обновлено 0, установлено 4 новых пакетов, для удаления отмечено 0 пакетов, и 11 пакетов не обновлено. Необходимо скачать 924 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 2 481 kB. Хотите продолжить? [Д/н] Y Получено:1 http://mirror.yandex.ru/debian/ jessie/main libluajit-5.1-common all 2.0.3+dfsg-3 [36,6 kB] Получено:2 http://mirror.yandex.ru/debian/ jessie/main libluajit-5.1-2 amd64 2.0.3+dfsg-3 [204 kB] Получено:3 http://mirror.yandex.ru/debian/ jessie/main nginx-common all 1.6.2-5+deb8u4 [88,1 kB] Получено:4 http://mirror.yandex.ru/debian/ jessie/main nginx-extras amd64 1.6.2-5+deb8u4 [595 kB] Получено 924 kБ за 0с (4 463 kБ/c) Предварительная настройка пакетов ... Выбор ранее не выбранного пакета libluajit-5.1-common. (Чтение базы данных … на данный момент установлен 44461 файл и каталог.) Подготовка к распаковке …/libluajit-5.1-common_2.0.3+dfsg-3_all.deb … Распаковывается libluajit-5.1-common (2.0.3+dfsg-3) … Выбор ранее не выбранного пакета libluajit-5.1-2:amd64. Подготовка к распаковке …/libluajit-5.1-2_2.0.3+dfsg-3_amd64.deb … Распаковывается libluajit-5.1-2:amd64 (2.0.3+dfsg-3) … Выбор ранее не выбранного пакета nginx-common. Подготовка к распаковке …/nginx-common_1.6.2-5+deb8u4_all.deb … Распаковывается nginx-common (1.6.2-5+deb8u4) … dpkg: ошибка при обработке архива /var/cache/apt/archives/nginx-common_1.6.2-5+deb8u4_all.deb (--unpack): попытка перезаписать «/etc/nginx/scgi_params», который уже имеется в пакете nginx 1.10.1-1~jessie Выбор ранее не выбранного пакета nginx-extras. Подготовка к распаковке …/nginx-extras_1.6.2-5+deb8u4_amd64.deb … Распаковывается nginx-extras (1.6.2-5+deb8u4) … dpkg: ошибка при обработке архива /var/cache/apt/archives/nginx-extras_1.6.2-5+deb8u4_amd64.deb (--unpack): попытка перезаписать «/usr/sbin/nginx», который уже имеется в пакете nginx 1.10.1-1~jessie dpkg-deb: ошибка: подпроцесс вставка уничтожен по сигналу (Обрыв канала) При обработке следующих пакетов произошли ошибки: /var/cache/apt/archives/nginx-common_1.6.2-5+deb8u4_all.deb /var/cache/apt/archives/nginx-extras_1.6.2-5+deb8u4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
I have some problems to install nginx pkg (nginx-full) on debian jessie
# apt-get install nginx-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
nginx-common
Suggested packages:
fcgiwrap nginx-doc
The following NEW packages will be installed:
nginx-common nginx-full
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 510 kB of archives.
After this operation, 1.271 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://debian.c3sl.ufpr.br/debian/ jessie/main nginx-common all 1.6.1-1 [83,6 kB]
Get:2 http://debian.c3sl.ufpr.br/debian/ jessie/main nginx-full amd64 1.6.1-1+b1 [427 kB]
Fetched 510 kB in 1s (266 kB/s)
Selecting previously unselected package nginx-common.
(Reading database ... 170540 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.6.1-1_all.deb ...
Unpacking nginx-common (1.6.1-1) ...
Selecting previously unselected package nginx-full.
Preparing to unpack .../nginx-full_1.6.1-1+b1_amd64.deb ...
Unpacking nginx-full (1.6.1-1+b1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up nginx-common (1.6.1-1) ...
Setting up nginx-full (1.6.1-1+b1) ...
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' 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
Errors were encountered while processing:
nginx-full
E: Sub-process /usr/bin/dpkg returned an error code (1)
# systemctl status nginx.service
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: failed (Result: exit-code) since Sex 2014-09-05 11:39:46 BRT; 1s ago
Process: 2972 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
#journalctl -xn
No journal files were found.
Someone know how to fix it?
asked Sep 5, 2014 at 14:50
gnomexgnomex
3131 gold badge3 silver badges5 bronze badges
3
A similar issue was reported on Debian bug #754407. In the end it was just the port 80 being taken by other process (Apache2). Might this be your case as well?
answered Sep 10, 2014 at 21:57
GheeshGheesh
4914 silver badges3 bronze badges
5
Stop apache2
service apache2 stop
then install nginx
apt-get install nginx
Then celebrate it!
yaegashi
11.8k1 gold badge35 silver badges40 bronze badges
answered Jul 9, 2015 at 23:01
KapanetKapanet
3212 silver badges2 bronze badges
0
in my case I executed
sudo apt-get remove nginx* --purge
after that I installed nginx-common
sudo apt-get install nginx-common
then I installed nginx
sudo apt-get install nginx
after this I typed ip in browser and it worked
answered Nov 10, 2016 at 7:18
I had the same problem.
I DO NOT have Apache, and nothing else was blocking my port 80.
I could NOT install nginx with
sudo apt-get install nginx
nor with
sudo apt-get install nginx-common nginx-full
After one week I stumbled over this little blog: https://etc.banana.fish/?p=75
In this blog, the solution is:
- Install nginx-common:
sudo apt-get install nginx-common
- Remove
listen [::]:80 default_server;
from /etc/nginx/sites-enabled/default (I made this using the root-user) - Just to be sure, I did reboot my server.
- Just to be sure twice, I did
sudo apt-get update
and thensudo apt-get upgrade
. - Now I finally called
sudo apt-get install nginx-full
and it worked!
Afterwords I could see the Titlescreen of nginx, when I typed in the IP of my remote server!
answered Jul 21, 2016 at 12:11
I encounter this issue when apt-get remove nginx
and apt-get automove nginx
, and after than I manually remove the nginx folder. When I apt-get install nginx
again, this issue comes out.
~# apt-get install
nginx Reading package lists… Done Building
dependency tree Reading state information… Done nginx is
already the newest version. 0 upgraded, 0 newly installed, 0 to remove
and 140 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-full (1.6.2-5+deb8u4) … Job for
nginx.service failed. See ‘systemctl status nginx.service’ and
‘journalctl -xn’ 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-full (>= 1.6.2-5+deb8u4) | nginx-light
(>= 1.6.2-5+deb8u4) | nginx-extras (>= 1.6.2-5+deb8u4); however:
Package nginx-full is not configured yet. Package nginx-light is not
installed. Package nginx-extras is not installed. nginx depends on
nginx-full (<< 1.6.2-5+deb8u4.1~) | nginx-light (<< 1.6.2-5+deb8u4.1~)
| nginx-extras (<< 1.6.2-5+deb8u4.1~); however: 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)
and
~# systemctl status nginx.service
nginx.service — A high performance
web server and a reverse proxy server Loaded: loaded
(/lib/systemd/system/nginx.service; enabled) Active: failed
(Result: exit-code) since Tue 2017-03-21 04:35:29 EDT; 1min 33s ago
Process: 19912 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on;
master_process on; (code=exited, status=1/FAILURE) Main PID: 18408
(code=exited, status=0/SUCCESS)Mar 21 04:35:29 dayinhu nginx[19912]: nginx: [emerg] open()
«/etc/nginx/nginx.conf» failed (2: No such file or directory) Mar 21
04:35:29 dayinhu nginx[19912]: nginx: configuration file
/etc/nginx/nginx.conf test failed Mar 21 04:35:29 dayinhu systemd[1]:
nginx.service: control process exited, code=exited status=1 Mar 21
04:35:29 dayinhu systemd[1]: Failed to start A high performance web
server and a reverse proxy server. Mar 21 04:35:29 dayinhu systemd[1]:
Unit nginx.service entered failed state.
It’s said the nginx.conf lost, I tryed many times with no success.
Finally I fixed by,
apt-get purge nginx nginx-common nginx-full
apt-get install nginx
answered Mar 21, 2017 at 8:55
LF00LF00
1564 bronze badges
1
in my case the error is the server has IPv6 disabled. just edit nginx configuration files to fix ( for example : /etc/nginx/sites-enabled/default ) and restart nginx demon.
answered May 27, 2016 at 13:46
MassimoMassimo
9451 gold badge10 silver badges23 bronze badges
I was having the same problem. The advice about Apache wasn’t relevant, as I’d actively uninstalled it during setup.
Turns out I was seeing the result of a conflict between nginx’s config file /etc/nginx/nginx.conf
and the service script at /lib/systemd/system/nginx.service
.
Specifically, the service script was starting nginx with some options, including daemon on
:
$ cat /lib/systemd/system/nginx.service
...
[Service]
...
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
...
I ran /usr/sbin/nginx -g 'daemon on; master_process on;'
directly on the terminal and got the following error:
nginx: [emerg] "daemon" directive is duplicate in /etc/nginx/nginx.conf:1
I took a look in /etc/nginx/nginx.conf
and found (on line 1):
daemon off;
Commenting this out and running sudo apt-get -f install
resolved the problem.
answered Aug 27, 2016 at 8:44
To install NGINX without stopping previous web server do :
sudo apt install nginx
To have the config, then :
sudo unlink /etc/nginx/sites-enabled/default
Then redo the install :
sudo apt install nginx
And it works !
answered Nov 3, 2020 at 8:28
- if you have skype: switch skype port
80
to443
- stop apache2 service
- install nginx
- restart apache2
- apt-get update
Jakuje
20.7k7 gold badges50 silver badges70 bronze badges
answered Apr 17, 2016 at 16:52
Using Linux Mint 18.3
when I had nginx installed which was running well.
I needed to uninstall it for some reason, and I uninstall it using command:
sudo apt purge nginx -y
sudo rm -rf /etc/nginx
sudo apt autoremove
then when I need it later again, I tried:
sudo apt install nginx -y
it says me following error:
here are all the lines from terminal:
sudo apt install nginx -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
nginx-common nginx-core
Suggested packages:
fcgiwrap nginx-doc
The following NEW packages will be installed:
nginx nginx-common nginx-core
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/458 kB of archives.
After this operation, 1,482 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 235105 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.10.3-0ubuntu0.16.04.2_all.deb ...
Unpacking nginx-common (1.10.3-0ubuntu0.16.04.2) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../nginx-core_1.10.3-0ubuntu0.16.04.2_amd64.deb ...
Unpacking nginx-core (1.10.3-0ubuntu0.16.04.2) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.10.3-0ubuntu0.16.04.2_all.deb ...
Unpacking nginx (1.10.3-0ubuntu0.16.04.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Setting up nginx-common (1.10.3-0ubuntu0.16.04.2) ...
Setting up nginx-core (1.10.3-0ubuntu0.16.04.2) ...
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 Tue 2018-05-29 22:56:08 +06; 18ms ago
Process: 2929 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
May 29 22:56:08 ahs-pc systemd[1]: Starting A high performance web server a.....
May 29 22:56:08 ahs-pc nginx[2929]: nginx: [emerg] open() "/etc/nginx/nginx...y)
May 29 22:56:08 ahs-pc nginx[2929]: nginx: configuration file /etc/nginx/ng...ed
May 29 22:56:08 ahs-pc systemd[1]: nginx.service: Control process exited, c...=1
May 29 22:56:08 ahs-pc systemd[1]: Failed to start A high performance web s...r.
May 29 22:56:08 ahs-pc systemd[1]: nginx.service: Unit entered failed state.
May 29 22:56:08 ahs-pc systemd[1]: nginx.service: Failed with result 'exit-...'.
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-0ubuntu0.16.04.2) | nginx-full (>= 1.10.3-0ubuntu0.16.04.2) | nginx-light (>= 1.10.3-0ubuntu0.16.04.2) | nginx-extras (>= 1.10.3-0ubuntu0.16.04.2); 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-0ubuntu0.16.04.2.1~) | nginx-full (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-light (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-extras (<< 1.10.3-0ubuntu0.16.04.2.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.
dpkg: error processing package nginx (--configure):
dependency problems - leaving No apport report written because the error message indicates its a followup error from a previous failure.
unconfigured
Errors were encountered while processing:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
I’ve tried force install also, like bellow:
sudo apt install -f nginx
but throws the same error!