Ich habe kürzlich meinen Ubuntu-Server auf die Version 16.04 aktualisiert. Seitdem kann ich den Nginx-Dienst nicht mehr starten.
Ergebnisse von service nginx restart
:
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
Was meine Systemprotokolle sagen ( cat /var/log/syslog
):
May 20 17:03:53: Stopped A high performance web server and a reverse proxy server.
May 20 17:03:53: Starting A high performance web server and a reverse proxy server...
May 20 17:03:53: nginx.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directory
May 20 17:03:53: nginx.service: Control process exited, code=exited status=203
May 20 17:03:53: Failed to start A high performance web server and a reverse proxy server.
May 20 17:03:53: nginx.service: Unit entered failed state.
May 20 17:03:53: nginx.service: Failed with result 'exit-code'.
Ergebnisse von cat /lib/systemd/system/nginx.service
:
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
# http://nginx.org/en/docs/control.html
#
[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
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
# Use TERM instead of QUIT to prevent Nginx from leaving stale Unix socket and failing the next start (https://trac.nginx.org/nginx/ticket/753)
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry TERM/5 --pidfile /run/nginx.pid
# Give Passenger a chance to clean up before being killed by systemd.
ExecStop=/bin/sleep 1
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target
Es gibt zwar keine Datei bei /usr/sbin/nginx
, also habe ich es versucht apt install nginx
, aber hier ist das Ergebnis:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx : Depends: nginx-core (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-full (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-light (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-extras (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed
Depends: nginx-core (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-full (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-light (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-extras (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Als Neuling bin ich ziemlich verloren in diesem Durcheinander und ich brauche wirklich ein bisschen Hilfe.
Vielen Dank für Ihre Zeit.
Update 1:
Ergebnisse von apt-cache policy nginx
:
nginx:
Installed: 1.12.0-1+xenial1
Candidate: 1.12.0-1+xenial1
Version table:
*** 1.12.0-1+xenial1 500
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main amd64 Packages
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main i386 Packages
100 /home/var/lib/dpkg/status
1.10.0-0ubuntu0.16.04.4 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
1.9.15-0ubuntu1 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main i386 Packages