unable to install nginx-full package

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

unable to install nginx-full package

kamaraju kusumanchi-2
The nginx-full package fails to install on Debian stable (Stretch).
Does anyone know why? Is this a bug?

 % sudo apt-get install nginx-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
nginx-full is already the newest version (1.10.3-1+deb9u1).
The following packages were automatically installed and are no longer required:
<package list snipped>
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up nginx-full (1.10.3-1+deb9u1) ...
[FAIL] Starting nginx: nginx failed!
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
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)


 % cat /etc/apt/sources.list
deb http://httpredir.debian.org/debian/ stretch main contrib non-free
deb-src http://httpredir.debian.org/debian/ stretch main contrib non-free
deb http://httpredir.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://httpredir.debian.org/debian/ stretch-updates main
contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free
deb http://debug.mirrors.debian.org/debian-debug/ stretch-debug main
contrib non-free

thanks
raju
--
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

Reply | Threaded
Open this post in threaded view
|

Re: unable to install nginx-full package

Steve Kemp-4
> The nginx-full package fails to install on Debian stable (Stretch).

  Looks like it does install, but then it fails to start.

> Does anyone know why? Is this a bug?

  You should be able to see why it fails to start by looking at the
 nginx error-log, explore beneath /var/log/nginx.

  I would *guess* that you have an existing webserver, such as apache,
 running.  If that is the case you'll want to stop it before you try
 again - because it will bind to port 80 (and possibly 443), which
 will prevent another program from doing the same (i.e. If nginx tries
 to start, but port 80 is in use it'll fail and stop).

> Do you want to continue? [Y/n]
> Setting up nginx-full (1.10.3-1+deb9u1) ...

  Installed & setting up.

> [FAIL] Starting nginx: nginx failed!

  Failed to start.

> invoke-rc.d: initscript nginx, action "start" failed.

  Failed to start.

> dpkg: error processing package nginx-full (--configure):

  So the configuration-process failed, which marked the installation
 as failed.

Steve
--
https://www.steve.org.uk/

Reply | Threaded
Open this post in threaded view
|

Re: unable to install nginx-full package

Stephan Seitz-5
On Di, Sep 18, 2018 at 05:34:43 +0000, Steve Kemp wrote:
>  I would *guess* that you have an existing webserver, such as apache,
> running.  If that is the case you'll want to stop it before you try

Or he has IPv6 disabled (maybe company policy). In this case nginx will
fail to start as well.

Shade and sweet water!

        Stephan

--
| Public Keys: http://fsing.rootsland.net/~stse/keys.html |

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: unable to install nginx-full package

kamaraju kusumanchi-2
In reply to this post by Steve Kemp-4
On Tue, Sep 18, 2018 at 1:34 AM, Steve Kemp <[hidden email]> wrote:
>
>   You should be able to see why it fails to start by looking at the
>  nginx error-log, explore beneath /var/log/nginx.
>

Thanks Steve. Very helpful. BTW thank you very much for creating
https://debian-administration.org/ . I found it invaluable back in the
day.

>   I would *guess* that you have an existing webserver, such as apache,
>  running.  If that is the case you'll want to stop it before you try
>  again - because it will bind to port 80 (and possibly 443), which
>  will prevent another program from doing the same (i.e. If nginx tries
>  to start, but port 80 is in use it'll fail and stop).
>

Yes. That is exactly what was happening. I stopped apache2
(/etc/init.d/apache2 stop) and then the configuration process of
nginx-full completed successfully.

A follow up question:
Should I remove apache2 packages completely from the system or is
there a way to install both apache2 and nginx but only start nginx
upon each reboot?

thanks
raju
--
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

Reply | Threaded
Open this post in threaded view
|

Re: unable to install nginx-full package

Nemeth Gyorgy
2018-09-19 06:19 keltezéssel, kamaraju kusumanchi írta:
>
> A follow up question:
> Should I remove apache2 packages completely from the system or is
> there a way to install both apache2 and nginx but only start nginx
> upon each reboot?
You can disable apache2 starting or you can even reconfigure it to
listen on different port.

Reply | Threaded
Open this post in threaded view
|

Re: unable to install nginx-full package

kamaraju kusumanchi-2


On Wed, Sep 19, 2018, 12:44 PM Nemeth Gyorgy <[hidden email]> wrote:
2018-09-19 06:19 keltezéssel, kamaraju kusumanchi írta:
>
> A follow up question:
> Should I remove apache2 packages completely from the system or is
> there a way to install both apache2 and nginx but only start nginx
> upon each reboot?
You can disable apache2 starting or you can even reconfigure it to
listen on different port.

Good to know. Can you tell me how to disable apache 2 but have nginx start when I start the system?
Reply | Threaded
Open this post in threaded view
|

Re: unable to install nginx-full package

Michael Wagner
On Sep 19, 2018 at 23:10:21, kamaraju kusumanchi wrote:
>
> Good to know. Can you tell me how to disable apache 2 but have nginx start when
> I start the system?
>

systemctl disable apache2.service
systemctl enable nginx.service

must do the trick.

Hth Michael

--
Those who can, do. Those who can't, supervise!

signature.asc (923 bytes) Download Attachment