GPG Error Updating Ubuntu/Debian Packages
I am attempting to update my Ubuntu/Debian system and I am getting an error:
GPG error: http://deb.opera.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E585066A30C18A2B
What does it mean, and how can I resolve it?
Try following approach, is from there
The error NO_PUBKEY E585066A30C18A2B is the key for the Opera web browser. To correct the error, run the following code.
wget -O - http://deb.opera.com/archive.key | apt-key add -
sudo wget -O - http://deb.opera.com/archive.key | apt-key add --2016-09-24 09:42:48-- http://deb.opera.com/archive.key Resolving deb.opera.com (deb.opera.com)... 22.214.171.124 Connecting to deb.opera.com (deb.opera.com)|126.96.36.199|:80... connected. HTTP request sent, awaiting response... ERROR: This command can only be used by root. 200 OK Length: 3152 (3,1K) [application/pgp-keys] Saving to: ‘STDOUT’ - 0%[ ] 0 --.-KB/s in 0s Cannot write to ‘-’ (Broken pipe).
Newer versions of apt also support
apt-key adv --fetch-keys https://deb.opera.com/archive.key
wget -qO - https://deb.opera.com/archive.key | apt-key add -
Additionally, you should always use https when loading the key.