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 4F4EA0AAE5267A6C
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 # install launchpad-getkeys sudo apt-get install launchpad-getkeys # run it sudo launchpad-getkeys