W: GPG error: http://dl.google.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ....

sudo apt-get update && sudo apt-get -y upgrade; 할때 아래처럼 나오는 경우가 있다

VzogR1BHIGVycm9yOiBodHRwOi8vZGwuZ29vZ2xlLmNvbSBzdGFibGUgSW5SZWxlYXNlOiBUaGUgZm9sbG93aW5nIHNpZ25hdHVyZXMgY291bGRuJ3QgYmUgdmVyaWZpZWQgYmVjYXVzZSB0aGUgcHVibGljIGtleSBpcyBub3QgYXZhaWxhYmxlOiBOT19QVUJLRVkgLi4uLg==
W: GPG error: http://dl.google.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ....

 

그럴땐 아래처럼 커맨드 치고난 후

d2dldCAtcSAtTyAtIGh0dHBzOi8vZGwtc3NsLmdvb2dsZS5jb20vbGludXgvbGludXhfc2lnbmluZ19rZXkucHViIHwgc3VkbyBhcHQta2V5IGFkZCAt
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

 

다시 시도해보라

c3VkbyBhcHQtZ2V0IHVwZGF0ZSAmJiBzdWRvIGFwdC1nZXQgLXkgdXBncmFkZTs=
sudo apt-get update && sudo apt-get -y upgrade;