OS/Linux
Ubuntu에서 GPG ERROR NO_PUBKEY 해결방법
dozob
2022. 10. 11. 09:59
$ sudo apt-get update
...
W: GPG error: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 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.
아래 사이트로 접속해 NO_PUBKEY 뒷 부분의 코드 앞에 '0x'를 붙여서 검색
MIT GPG KeyServer: http://pgp.mit.edu/
MIT PGP Key Server
pgp.mit.edu
pub 오른쪽 key ID 항목(3BF863CC) 복사해서 키 등록
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 3BF863CC
Executing: /tmp/apt-key-gpghome.8Pt4MWCK04/gpg.1.sh --keyserver keyserver.ubuntu.com --recv 3BF863CC
gpg: key A4B469963BF863CC: public key "cudatools <cudatools@nvidia.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
업데이트 확인
$ sudo apt-get update
Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease [1581 B]
Hit:2 https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 InRelease
Ign:3 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease
Get:4 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Packages [950 kB]
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release
Hit:8 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:9 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:10 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Fetched 950 kB in 2s (582 kB/s)
Reading package lists... Done