0
Help us understand the problem. What are the problem?

posted at

W: GPG error: http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY xxx

Error

sudo apt update
...
Get:10 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease [81.6 kB]                       
Err:10 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXX
Reading package lists... Done 
W: GPG error: http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXX
E: The repository 'http://apt.postgresql.org/pub/repos/apt stretch-pgdg 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.

解決方法

nakamasato@xxxx:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXXXX
Executing: /tmp/apt-key-gpghome.zfSr40cnbr/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXXXX
gpg: key XXXXXXXXXXXXXX: 6 signatures not checked due to missing keys
gpg: key XXXXXXXXXXXXXX: public key "PostgreSQL Debian Repository" imported
gpg: Total number processed: 1
gpg:               imported: 1

References

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
0
Help us understand the problem. What are the problem?