본문 바로가기

Linux

apt-get update NO_PUBKEY 오류

PUBKET가 등록되어 있지 않아 발생하는 오류 같다.

bitnami@ip-172-26-15-118:~$ sudo apt update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Get:2 http://repo.mysql.com/apt/debian bullseye InRelease [17.9 kB]            
Err:2 http://repo.mysql.com/apt/debian bullseye InRelease                      
  The following signatures couldn't be verified because the public key is not available: N
O_PUBKEY B7B3B788A8D3785C
Hit:3 http://cdn-aws.deb.debian.org/debian bullseye InRelease
Hit:4 http://cdn-aws.deb.debian.org/debian bullseye-updates InRelease
Hit:5 http://cdn-aws.deb.debian.org/debian bullseye-backports InRelease
Reading package lists... Done
W: GPG error: http://repo.mysql.com/apt/debian bullseye InRelease: The following signature
s couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
E: The repository 'http://repo.mysql.com/apt/debian bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by de
fault.
N: See apt-secure(8) manpage for repository creation and user configuration details.

 

나의 경우에 미등록 키는 B7B3B788A8D3785C 이므로 해당 키를 등록처리 해주었다.

 

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key
(8)).
Executing: /tmp/apt-key-gpghome.BGam6d1zj5/gpg.1.sh --keyserver keyserver.ubuntu.com --rec
v-keys B7B3B788A8D3785C
gpg: key B7B3B788A8D3785C: public key "MySQL Release Engineering <mysql-build@oss.oracle.c
om>" imported
gpg: Total number processed: 1
gpg:               imported: 1

 

그 후 다시 sudo apt-get update

 

bitnami@ip-172-26-15-118:~$ sudo apt update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://cdn-aws.deb.debian.org/debian bullseye InRelease                  
Hit:3 http://cdn-aws.deb.debian.org/debian bullseye-updates InRelease          
Hit:4 http://cdn-aws.deb.debian.org/debian bullseye-backports InRelease        
Get:5 http://repo.mysql.com/apt/debian bullseye InRelease [17.9 kB]            
Get:6 http://repo.mysql.com/apt/debian bullseye/mysql-8.0 Sources [949 B]
Get:7 http://repo.mysql.com/apt/debian bullseye/mysql-apt-config amd64 Packages [566 B]
Get:8 http://repo.mysql.com/apt/debian bullseye/mysql-8.0 amd64 Packages [12.6 kB]
Get:9 http://repo.mysql.com/apt/debian bullseye/mysql-tools amd64 Packages [4,114 B]
Fetched 36.1 kB in 2s (20.5 kB/s)   
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

 

'Linux' 카테고리의 다른 글

Linux war 압축 및 압축풀기  (0) 2017.02.02
rpm과 yum의 설명 및 명령어  (0) 2017.01.16