Wieso schlägt die Installation von Programmen bei Raspbian fehl?

Ich möchte auf meinem neuen Raspberry Pi 4 B 8 GB Java installieren.

Ich habe folgendes ausgeführt:

sudo apt update

sudo apt install default-jdk

Mein Raspi spuckt mir folgendes aus:

pi@raspberrypi:~ $ sudo apt install default-jdk
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
default-jdk ist schon die neueste Version (2:1.11-71).
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  lxplug-volume python-colorzero
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] J
dphys-swapfile (20100506-5+rpt2) wird eingerichtet ...
Job for dphys-swapfile.service failed because the control process exited with error code.
See "systemctl status dphys-swapfile.service" and "journalctl -xe" for details.
invoke-rc.d: initscript dphys-swapfile, action "restart" failed.
● dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file
   Loaded: loaded (/lib/systemd/system/dphys-swapfile.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-07-24 20:18:16 BST; 18ms ago
     Docs: man:dphys-swapfile(8)
  Process: 1370 ExecStart=/sbin/dphys-swapfile setup (code=exited, status=0/SUCCESS)
  Process: 1393 ExecStart=/sbin/dphys-swapfile swapon (code=exited, status=255/EXCEPTION)
 Main PID: 1393 (code=exited, status=255/EXCEPTION)


Jul 24 20:18:16 raspberrypi systemd[1]: Starting dphys-swapfile - set up, mount/unmount, and delete a swap file...
Jul 24 20:18:16 raspberrypi dphys-swapfile[1370]: want /var/swap=100MByte, checking existing: keeping it
Jul 24 20:18:16 raspberrypi dphys-swapfile[1393]: swapon: /var/swap: swapon failed: Das Argument ist ungültig
Jul 24 20:18:16 raspberrypi systemd[1]: dphys-swapfile.service: Main process exited, code=exited, status=255/EXCEPTION
Jul 24 20:18:16 raspberrypi systemd[1]: dphys-swapfile.service: Failed with result 'exit-code'.
Jul 24 20:18:16 raspberrypi systemd[1]: Failed to start dphys-swapfile - set up, mount/unmount, and delete a swap file.
dpkg: Fehler beim Bearbeiten des Paketes dphys-swapfile (--configure):
 »installiertes dphys-swapfile-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 dphys-swapfile
E: Sub-process /usr/bin/dpkg returned an error code (1)

Kann mir bitte jemand helfen?

Habe im Internet leider keine brauchbare Antworten gefunden.

Auf meinen Pi läuft Raspberry Pi OS auf der Version 11/2020

PS: Steht dort es sei schon installiert, weil es nicht das erste Mal war, bei dem ich diesen Befehl ausgeführt habe. Mein Raspberry denkt daher, Java sei schon installiert, was nicht stimmt

MFG

Computer, Linux, Raspberry Pi, Raspberry, raspbian
Ubuntu apt update funktioniert nicht - GPG signatures invalid Error?

Hey! Wenn ich versuche, auf Ubuntu den apt update Befehl auszuführen, bekomme ich einen sehr langen Error:

tux@cruggserver:~$ sudo apt-get update
Ign:1 http://archive.ubuntu.com/ubuntu precise InRelease
Hit:2 http://archive.ubuntu.com/ubuntu precise Release
Get:3 http://archive.ubuntu.com/ubuntu precise-updates InRelease [55,7 kB]
Get:4 http://archive.ubuntu.com/ubuntu precise-security InRelease [55,7 kB]
Get:5 http://archive.ubuntu.com/ubuntu precise-backports InRelease [55,7 kB]
Get:6 http://archive.ubuntu.com/ubuntu precise Release.gpg [198 B]
Err:3 http://archive.ubuntu.com/ubuntu precise-updates InRelease
  The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
Err:4 http://archive.ubuntu.com/ubuntu precise-security InRelease
  The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
Err:5 http://archive.ubuntu.com/ubuntu precise-backports InRelease
  The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
Ign:6 http://archive.ubuntu.com/ubuntu precise Release.gpg
Reading package lists... Done
W: GPG error: http://archive.ubuntu.com/ubuntu precise-updates InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://archive.ubuntu.com/ubuntu precise-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu precise-security InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://archive.ubuntu.com/ubuntu precise-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu precise-backports InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://archive.ubuntu.com/ubuntu precise-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu precise Release: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://archive.ubuntu.com/ubuntu precise Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Ich habe schon sehr vieles im Internet probiert, jedoch hat nichts geklappt.

Linux, Ubuntu, apt-get, GPG
Probleme beim Ubuntu-Update (apt-get: 404 Not Found)?

Hallo, würde mich über etwas Unterstützung sehr freuen. Als mittlerer Anfänger in Sachen Shell gelingt es mir leidern nicht mehr, mein Ubuntu auf WSL zu updaten. Ausgabe von

sudo apt-get update
:

Ign:1 http://archive.ubuntu.com/ubuntu main InRelease
Ign:2 http://archive.ubuntu.com/ubuntu -security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu -updates InRelease
...
Ign:60 http://archive.ubuntu.com/ubuntu -updates/multiverse Translation-en_US
Ign:61 http://archive.ubuntu.com/ubuntu -updates/multiverse Translation-en
Err:7 http://archive.ubuntu.com/ubuntu main/restricted Sources
  404  Not Found [IP: 91.189.88.174 80]
Ign:8 http://archive.ubuntu.com/ubuntu main/universe Sources
Ign:9 http://archive.ubuntu.com/ubuntu main/multiverse Sources
...
Ign:52 http://archive.ubuntu.com/ubuntu -updates/restricted Translation-en_US
Reading package lists... Done
W: The repository 'http://archive.ubuntu.com/ubuntu main Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://archive.ubuntu.com/ubuntu -security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://archive.ubuntu.com/ubuntu -updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/main/restricted/source/Sources  404  Not Found [IP: 91.189.88.174 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/-security/main/source/Sources  404  Not Found [IP: 91.189.88.174 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/-updates/main/source/Sources  404  Not Found [IP: 91.189.88.174 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Ich habe leider keine Ahnung, wie ich das beheben kann, trotz unzähligen Kommandos, die ich von StackOverflow kopiert habe.

Gibt es irgendeine Möglichkeit, apt einfach komplett zurückzusetzen? Im schlimmsten Fall bin ich auch bereit, alle Packages, die ich hinzuinstalliert habe, zu missen, solange meine Einstellungen nicht verloren gehen. Über jede Hilfe wäre ich sehr dankbar!

PC, Computer, Technik, Linux, Ubuntu, Update, Unix, apt-get

Meistgelesene Fragen zum Thema Apt