
Ubuntu 20.04 LTS에 Docker를 설치하려고 합니다. 나는 사용하고있다공식 문서. 예전에는 문제 없이 해본 적이 있어요.
실행 후 오류는 다음과 같습니다 sudo apt-get update
.
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://ir.archive.ubuntu.com/ubuntu focal InRelease
Hit:5 http://ir.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:6 https://download.docker.com/linux/ubuntu focal InRelease [52.1 kB]
Hit:7 http://ir.archive.ubuntu.com/ubuntu focal-backports InRelease
Err:6 https://download.docker.com/linux/ubuntu focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
Reading package lists... Done
W: GPG error: https://download.docker.com/linux/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
E: The repository 'https://download.docker.com/linux/ubuntu focal 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.
나는 보았다GPG 오류 "NO_PUBKEY"를 어떻게 수정하나요?하지만 문제를 해결할 수 없었습니다.
답변1
Docker 문서의 두 번째 단계가 시스템에 적용되었는지 다시 확인하는 것이 좋습니다.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
이것이 없으면 저장소에 연결할 수 없습니다. 방금 새로운 Ubuntu 설치에서 설치 단계를 테스트했는데 모든 것이 문제 없이 작동했습니다. 이것이 당신이 해야 할 전부이길 바랍니다
답변2
저에게는 권한을 두 번 변경해야 했습니다.
sudo chmod 755 /etc/apt/keyrings
sudo chmod a+r /etc/apt/keyrings/docker.gpg
내 기본 umask는 apt가 폴더를 읽는 것조차 방해하고 있었습니다. 이것이 누군가에게 도움이 되기를 바랍니다.
답변3
그냥 사용
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
내 문제를 해결하지 못했습니다.
추가 정보가 필요합니다.
sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg
그런 다음 sudo apt-get update
잘 작동합니다.
답변4
해결 방법이 효과가 없으면 추가 단계가 필요합니다. 소스 목록의 docker 항목에 다운로드된 키의 위치가 있는지 확인하세요.
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable