Setting up nginx-full (1.6.2-5+deb8u1) ...
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+deb8u1) | nginx-light (>= 1.6.2-5+deb8u1) | nginx-extras (>= 1.6.2-5+deb8u1); 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+deb8u1.1~) | nginx-light (<< 1.6.2-5+deb8u1.1~) | nginx-extras (<< 1.6.2-5+deb8u1.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
Processing triggers for libc-bin (2.19-18+deb8u3) ...
Processing triggers for systemd (215-17+deb8u3) ...
Errors were encountered while processing:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Above is the error that is given to me when running sudo apt-get install nginx. I tried removing apache and nginx both and reinstalling but it gives the same error.
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:
sudo apt-get install nginx-commonlisten [::]:80 default_server; from /etc/nginx/sites-enabled/default (I made this using the root-user)sudo apt-get update and then sudo apt-get upgrade.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!
You didn't post the output of systemctl status nginx.service so this might not be right, but I had this issue because I had an old install of nginx I'd forgotten about.
So, I purged nginx and reinstalled:
apt-get purge nginx-full nginx-common
apt-get install nginx-full
Then I received another error, got the details: systemctl status nginx.service
In my case
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
So I have another web server listening on port 80.
To fix, I edited the default nginx site nano /etc/nginx/sites-available/default and removed listen on port 80.
I only needed SSL, so:
server {
listen 443 ssl;
//rest of config....
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With