Fix the NO_PUBKEY error with apt on Ubuntu

When updating or installing a package on a Debian-based distribution, you can face that alert:

W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886

This just means that a signing GPG key is missing or expired on your system. The error is giving you the ID of the missing key that you can use for looking for it on the Ubuntu website:

http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0xC2518248EEA14886

Copy the key that you just got from the website above into a file – mykey.txt, for example – and import it with the apt-key command:

apt-key add mykey.txt

Try to install/update the package again, and the error should not appear anymore.