public key is not available: NO_PUBKEY

有時更新會說有沒驗證的來源像這樣

GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C

(最後的字串4F4EA0AAE5267A6C是本範例缺失的key)

可以用這方法解決

                                                        (字串)
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 4F4EA0AAE5267A6C
gpg --export --armor 4F4EA0AAE5267A6C | sudo apt-key add -

從看來的

 

Leave a Reply