apt-get update/get 업그레이드 후 다음 메시지가 표시되는 경우 ubuntu 20.04.6을 어떻게 업그레이드할 수 있습니까? 업그레이드하기 전에 릴리스에 사용 가능한 모든 업데이트를 설치하십시오.

apt-get update/get 업그레이드 후 다음 메시지가 표시되는 경우 ubuntu 20.04.6을 어떻게 업그레이드할 수 있습니까? 업그레이드하기 전에 릴리스에 사용 가능한 모든 업데이트를 설치하십시오.

현재 버전의 우분투 20.04.6을 업그레이드할 수 없습니다. 최신 버전으로 업그레이드하고 싶은데 이것이 문제인지 확실하지 않지만 업그레이드 가능 목록을 나열하면 다음 메시지가 나타납니다.

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

그런 다음 다음 명령을 진행합니다.

**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

이전 게시물의 다른 답변을 확인했습니다.

apt-mark showhold
mongodb-mongosh

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

도와주세요

답변1

소스 목록에 제3자 저장소(호스트 이름 repo.mongodb.org 포함)가 있습니다. 이 저장소는 패키지 인덱스 업데이트에 실패했으며 apt udpate이후 패키지 업데이트 다운로드에도 실패했습니다.

어쨌든 타사 저장소는 일반적으로 dist 업그레이드 중에 비활성화됩니다. 해당 저장소( /etc/apt/sources.list또는 ) 를 찾아 /etc/apt/sources.list.d/*주석 처리하는 것이 좋습니다. 그런 다음 apt-update를 다시 실행하면 mogodb에 여전히 업데이트가 필요하다는 사실을 잊어야 합니다.

mongodb에 중요한 데이터가 있다면 업그레이드 후 처음부터 다시 로드해야 할 수도 있으므로 반드시 덤프하고 백업해두시기 바랍니다.

그런 다음 업그레이드한 후 Ubuntu와 함께 제공되는 mongodb를 사용하거나 저장소를 처음부터 다시 설치하고(URL이 변경되었을 수 있음) mongodb 서비스를 복원하는 데 필요한 모든 조치를 취하십시오.

또는 mongodb를 사용하지 않는 경우 패키지를 완전히 제거하고 업데이트를 수행할 수 있습니다. 업데이트하지 않고 시스템에 그대로 두면 시스템이 이전 OS 버전의 종속성을 유지할 수 있으므로 이는 더 깔끔할 수 있습니다. 때로는 이것이 갈등을 일으키기도 하고 때로는 apt autoremove결국 얻게 될 잔해를 남기기도 합니다.

답변2

sudo apt list – 업그레이드 가능

당신은 사용하기로되어 있습니다

apt list --upgradable

의 출력에서 sudo apt update​​다음을 얻었습니다.

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

이는 추가한 mongodb 6.1 저장소가 Ubuntu 20.04에 존재하지 않음을 의미합니다.

소프트웨어 및 소스에서 저장소 삭제를 고려하십시오.

관련 정보