This may not actually be a problem with looking up the keyserver, which is what the error suggests. The apt-key
command calls gpg
, which in turn tries to access the keyserver. Apparently there's a bug in gpg
whereby if the keyserver doesn't have the key you are requesting, then gpg
misinterprets that as "host not found".
It may well be that a non-responsive keyserver will do the same thing, and I have seen environments where the keyservers are blocked (corporate firewall rules), so that could be your root cause if there is an upstream firewall you do not have access to.
Just for reference, the key is there and the keyserver is currently responding for me:
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.rh1myoBdSE --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server keyserver.ubuntu.com
gpg: key 7F0CEB10: "Richard Kreuter <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
It may be that the port is the issue (it was the last time when I hit a corporate firewall problem), so try doing this on the standard HTTP port (80) instead, see if that sorts things out:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
dig keyserver.ubuntu.com
?