I have tried deleting my .gnupg directory but the error returns.
I get this:
gpg: lookup_hashtable failed: eof
gpg: lookup_hashtable failed: eof
gpg: upd_hashtable: read failed: eof
gpg: trust record 2, type 12: write failed: eof
gpg: Error: The trustdb is corrupted.
gpg: You may try to re-create the trustdb using the commands:
gpg: cd ~/.gnupg
gpg: gpg2 --export-ownertrust > otrust.tmp
gpg: rm trustdb.gpg
gpg: gpg2 --import-ownertrust < otrust.tmp
gpg: If that does not work, please consult the manual
I tried following the advice thrown out by the error and that doesn't work either. Tried Googling the problem but nothing comes up for "lookup_hastable".
I also installed seahorse and have my ssh keys stored in seahorse. Could there be confict going on with seahorse?
I'm running gpg --gen-key
from my normal user account and not trying to do anything fancy: just create a standard gpg key.
gpg-agent
running that is interfering, and that might need to be killed?gpg --fix-trustdb
gpg-agent
will automatically start when doing key operations with GnuPG 2.1, as it should do. The problem was either that you're using two different versions of GnuPG at once, or that something else modified the contents of the.gnupg
directory in such a way thatgpg-agent
got confused. When deleting the.gnupg
directory, the runninggpg-agent
was unaware of it. That's very much a "hand waving" type of explanation.