본문 바로가기
DBMS(DataBase Management System)/PostgreSQL

PostgreSQL 16을 설치하는 과정 중에 GPG 에러가 발생할 때 해결 방법

by 연구자 공학코드 2025. 5. 27.

공지사항

  1. 제가 운영하는 네이버 카페 개발자 커뮤니티 코어큐브(https://cafe.naver.com/ewsncube)에 가입하시면 컴퓨터 관련 학습 자료와 질의응답을 제공받으실 수 있습니다.

728x90
반응형

현상

apt-get 명령어를 사용할 때 아래와 같이 GPG 에러가 발생하는 경우가 있다.

Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32EE5355A6BC6E42
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease' doesn't support architecture 'i386'
W: Failed to fetch https://dl.google.com/linux/chrome/deb/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32EE5355A6BC6E42
W: Some index files failed to download. They have been ignored, or old ones used instead.

You can now start installing packages from apt.postgresql.org.

문제가 발생한 화면

원인

GPG 공개키가 신뢰할 수 있는 것이 아니라서 발생한다.

해결방법

해당 GPG 공개키를 등록하여 통신에 사용할 수 있도록 허가한다.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys {GPG공개키}
sudo apt-get update

해결하기 위해 명령어를 실행한 화면

GPG 에러가 발생했던 명령어를 다시 실행하면 아래와 같이 잘 진행되는 것을 확인할 수 있다.

문제가 해결된 화면

참고문서

  1. "sudo apt-get update 시 NO_PUBKEY 에러나는 문제", 꾸준희, 2020년 7월 6일. @원문보기
  2. "GPG public key 오류 - apt-get update가 안될 때.", Covenant, 2018년 7월 18일. @원문보기
  3. "[우분투 22.04] PostgreSQL 16 와 pgAdmin 4 설치 방법", 공학코드, 2025년 1월 15일. @원문보기

 

728x90
반응형

댓글