Fix "The following signatures couldn't be verified because the public key is not available" on Ubuntu 16.04 (Xenial)

Submitted by christophe on Tue, 08/11/2016 - 17:05

If you terminal looks like this after running apt-get update :

W: 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 {whatever}
W: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

You will be tempted to use apt-key or or add-apt-key to fix this issue.
In my case (and in most cases if you are using ondrej ppa for PHP7), this issue can be easily tackled

# add this ppa
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
# install launchpad-getkeys
sudo apt-get install launchpad-getkeys
# run it
sudo launchpad-getkeys

 
 

Tags

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.