2

I'm trying to update my nodejs installation, and phalconphp is getting in the way. When I run apt-get update, I get this complaint

Err:13 https://packagecloud.io/phalcon/stable/ubuntu xenial InRelease                                        
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4166E80CDCF8B31B

Following the advice of several threads (such as this one), I've tried to fetch the GPG key:

sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 4166E80CDCF8B31B

Results in

gpg: requesting key DCF8B31B from hkp server keyserver.ubuntu.com
gpgkeys: key 4166E80CDCF8B31B not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: key not found
gpg: keyserver communications error: bad public key
gpg: keyserver receive failed: bad public key

So how do I figure out which server should have the GPG key?

2

I got it by re-running the phalcon install script

curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash

This script has the URL to the correct key server and runs apt-get add on it (relevant portions here, feel free to read through the entire script though)

gpg_key_url="https://packagecloud.io/phalcon/stable/gpgkey"
# ...
curl -L "${gpg_key_url}" 2> /dev/null | apt-key add - &>/dev/null
  • How did that solve the missing key problem? I'm guessing it installed a newer key itself? You didn't need to run apt-key, or maybe the script did? – Xen2050 Jan 19 at 3:14
  • @Xen2050, the script has the correct URL for the key server and runs apt-key add. I've updated the answer with some details. – quickshiftin Jan 20 at 20:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.