When I try to upgrade my raspi I get an error message:

seb@raspi:~ $ sudo apt-get upgrade
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  realpath squeak-plugins-scratch squeak-vm
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] j
nginx-extras (1.10.3-1+deb9u1) wird eingerichtet ...
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 2018-08-10 11:16:44 CEST; 65ms ago
     Docs: man:nginx(8)
  Process: 2831 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
  Process: 2828 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)

Aug 10 11:16:42 raspi nginx[2831]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Aug 10 11:16:43 raspi nginx[2831]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Aug 10 11:16:43 raspi nginx[2831]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Aug 10 11:16:43 raspi nginx[2831]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Aug 10 11:16:43 raspi nginx[2831]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Aug 10 11:16:44 raspi nginx[2831]: nginx: [emerg] still could not bind()
Aug 10 11:16:44 raspi systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 10 11:16:44 raspi systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Aug 10 11:16:44 raspi systemd[1]: nginx.service: Unit entered failed state.
Aug 10 11:16:44 raspi systemd[1]: nginx.service: Failed with result 'exit-code'.
dpkg: Fehler beim Bearbeiten des Paketes nginx-extras (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von nginx:
 nginx hängt ab von nginx-full (<< 1.10.3-1+deb9u1.1~) | nginx-light (<< 1.10.3-1+deb9u1.1~) | nginx-extras (<< 1.10.3-1+deb9u1.1~); aber:
  Paket nginx-full ist nicht installiert.
  Paket nginx-light ist nicht installiert.
  Paket nginx-extras ist noch nicht konfiguriert.
 nginx hängt ab von nginx-full (>= 1.10.3-1+deb9u1) | nginx-light (>= 1.10.3-1+deb9u1) | nginx-extras (>= 1.10.3-1+deb9u1); aber:
  Paket nginx-full ist nicht installiert.
  Paket nginx-light ist nicht installiert.
  Paket nginx-extras ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes nginx (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Fehler traten auf beim Bearbeiten von:
 nginx-extras
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
seb@raspi:~ $

Unfortunately I have no idea how to handle this and where this belongs to. The things I set up seem to be working just fine. I don't know where nginx is coming from. I use the raspi mainly as pi hole and have ssh/vnc enabled and an connected an external hdd which I use as home network internal git server and backup drive through a samba server.

I see that the problem is that it wants to bind a port that is already in use but I don't know by whom or for what I would even need nginx or how to configure it.

nginx is missing some packets it depends on. Your error message says (translated):

dpkg: dependencies prevent configuration of nginx:
 nginx depends on nginx-full (<< 1.10.3-1+deb9u1.1~) | nginx-light (<< 1.10.3-1+deb9u1.1~) | nginx-extras (<< 1.10.3-1+deb9u1.1~); but:
  packet nginx-full not installed.
  packet nginx-light not installed.
  packet nginx-extras not yet configured.

Try to reinstall it with this commands in the hope it will also install the missing packets.

rpi ~$ sudo apt update
rpi ~$ sudo apt install --reinstall --install-recommends nginx
rpi ~$ sudo apt full-upgrade

Reboot.

It is also a good idea to follow the suggestion from the message you have quoted:

The following packets are installed automatically but no longer needed:
  realpath squeak-plugins-scratch squeak-vm
Use »sudo apt autoremove«, to remove them.
  • This does not work. I did try to install the packages that were reported missing in the (nginx-light, nginx-extras) before which also did not work. – sezi80 Aug 10 at 10:36
  • After sudo apt update, what is the error message when trying sudo apt install --reinstall --install-recommends nginx? – Ingo Aug 10 at 10:48

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.