I do not know about you but I changed my hostname two days ago. Since then, without seeing any relationship, I have been having quite a few warnings about pgp and later realized I also could not install packages which require installing pgp keys.
gpg: Note: database_open 134217901 waiting for lock (held by 217818)
After trying dozens of commands from old forums and deleting a directory I probably should not have, I stumbled on this : https://dev.gnupg.org/T6838
I just ran :
gpgconf --unlock pubring.db
Which told me something I already knew (locked by the folowing pid) but at least I was on the right track.
gpgconf: release_dotlock: not our lock (pid=217818)