On ubuntu 16.04, running
sudo apt-get update reports several GPG errors. Such as,
W: GPG error: http://security.ubuntu.com/ubuntu xenial-security InRelease: At least one invalid signature was encountered. W: The repository 'http://security.ubuntu.com/ubuntu xenial-security 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.
A simple google search finds many such cases. Often the solution involves,
sudo apt-key adv --recv-keys --keyserver keys.gnupg.net <some magic hex value>
My main question is, how to get the "magic hex sequence" to solve my problems?
Update (May 17), I reinstalled many packages, all apt and lib and ubuntu-keyring. Nothing changed.
It would be nice to figure out how to fix this specific problem. I gave up. Did a fresh install to 18.04.