Wie kann ich Ubuntu 20.04.6 aktualisieren, wenn ich nach apt-get update/get upgrade die Meldung „Bitte installieren Sie vor der Aktualisierung alle verfügbaren Updates für Ihre Version“ erhalte?

Wie kann ich Ubuntu 20.04.6 aktualisieren, wenn ich nach apt-get update/get upgrade die Meldung „Bitte installieren Sie vor der Aktualisierung alle verfügbaren Updates für Ihre Version“ erhalte?

Ich kann meine aktuelle Version von Ubuntu 20.04.6 nicht aktualisieren. Ich möchte auf die neueste Version aktualisieren und bin nicht sicher, ob das auch ein Problem ist. Wenn ich jedoch die aktualisierbare Version aufliste, erhalte ich diese Meldung:

sudo apt list –upgradable
Listing... Error!
E: input:0-13: error: Expected pattern
   –upgradable
   ^^^^^^^^^^^^^

Ich fahre dann mit diesen Befehlen fort:

**sudo apt-get update**
Hit:1 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu focal InRelease                      
Hit:3 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease              
Hit:4 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease            
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease               
Get:6 http://packages.microsoft.com/repos/code stable InRelease [3,569 B]      
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease      
Hit:8 https://dl.google.com/linux/chrome/deb stable InRelease                  
Ign:9 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.1 InRelease
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 InRelease
Hit:11 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 Release
Err:12 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.1 Release
  404  Not Found [IP: 18.165.201.128 443]
Hit:13 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 Release
Reading package lists... Done
E: The repository 'https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.1 Release' does not have a Release file.
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: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11 (multiverse/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11-icons-small (multiverse/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target CNF (multiverse/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target CNF (multiverse/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target Translations (multiverse/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11 (multiverse/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11-icons-small (multiverse/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target CNF (multiverse/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
W: Target CNF (multiverse/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/mongodb-org-4.4.list:1
**sudo apt-get upgrade -y**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mongodb-mongosh
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
udo apt-get upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mongodb-mongosh
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
**sudo apt-get dist-upgrade**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mongodb-mongosh
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
**sudo do-release-upgrade**
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading. 
**sudo reboot.** 
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Ich habe andere Antworten aus früheren Beiträgen überprüft:

apt-mark showhold
mongodb-mongosh

sudo apt full-upgrade
the only thing that didn't update was that mongodb-mongosh 

bitte helfen

Antwort1

Sie haben ein Drittanbieter-Repository (mit dem Hostnamen repo.mongodb.org) in Ihrer Quellenliste. Dieses Repository kann seinen Paketindex während der Aktualisierung nicht aktualisieren apt udpateund kann daher keine Aktualisierungen für das Paket herunterladen.

Repos von Drittanbietern werden während eines Dist-Upgrades normalerweise sowieso deaktiviert. Ich würde vorschlagen, dass Sie dieses Repo (in /etc/apt/sources.listoder /etc/apt/sources.list.d/*) finden und es auskommentieren. Führen Sie dann apt-update erneut aus und es sollte vergessen, dass mogodb noch Updates benötigt.

Wenn Sie wichtige Daten in MongoDB haben, sollten Sie diese sichern, da Sie sie nach dem Upgrade möglicherweise von Grund auf neu laden müssen.

Verwenden Sie nach dem Upgrade entweder das mit Ubuntu mitgelieferte MongoDB oder installieren Sie das Repository von Grund auf neu (die URL hat sich möglicherweise geändert) und ergreifen Sie die erforderlichen Maßnahmen, um den MongoDB-Dienst wiederherzustellen.

Wenn Sie MongoDB nicht verwenden, können Sie alternativ das Paket einfach vollständig entfernen und das Update durchführen. Dies ist möglicherweise sauberer, denn wenn Sie es auf dem System belassen, ohne es zu aktualisieren, behält das System möglicherweise Abhängigkeiten von der vorherigen Betriebssystemversion. Manchmal führt dies zu Konflikten, manchmal hinterlässt es einfach Müll, der apt autoremoveschließlich gelöscht wird.

Antwort2

sudo apt list –aktualisierbar

Sie sollten verwenden

apt list --upgradable

In der Ausgabe von sudo apt updateerhalten Sie

Err:12 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.1 Release
  404  Not Found [IP: 18.165.201.128 443]

Dies bedeutet, dass das von Ihnen hinzugefügte MongoDB 6.1-Repository für Ubuntu 20.04 nicht vorhanden ist.

Erwägen Sie, das Repository in „Software und Quellen“ zu löschen.

verwandte Informationen