Unable to generate a new key

cmy7373's Avatar


24 Nov, 2017 02:55 PM


I installed the GPG Suite 2017.1 version but i get error when i try to generate a new key:

Generate new key failed!
Code = 0
Error text:
gpg: lookup_hashtable failed: Unknown system error
gpg: trustdb: searching trust record failed: Unknown system error
gpg: Error: The trustdb is corrupted.
gpg: You may try to re-create the trustdb using the commands:
gpg: cd ~/.gnupg
gpg: gpg --export-ownertrust > otrust.tmp
gpg: rm trustdb.gpg
gpg: gpg --import-ownertrust < otrust.tmp
gpg: If that does not work, please consult the manual

I have tried to recreate the trustdb as it suggested but nothing works, i uninstaleld and reinstalled GPG Suite but still the same problem. I would appreciate if you could help me find a solution to this. Thank you

  1. Support Staff 1 Posted by Luke Le on 09 Dec, 2017 10:50 PM

    Luke Le's Avatar


    have you tried by any chance to not re-create the trustdb?
    It might be possible that somehow re-import the ownertrust file corrupts the trustdb again.

  2. 2 Posted by Brady on 13 Dec, 2017 03:48 AM

    Brady's Avatar

    Hi, I'm having this same problem and am unable to generate a key

  3. Support Staff 3 Posted by Luke Le on 13 Dec, 2017 03:59 PM

    Luke Le's Avatar

    Hi cmy7373, Brady,

    we are very sorry to hear you are experiencing problems with the latest version of GPG Suite.
    We believe this problem is triggered if a user has a custom GnuPG version installed along side of our MacGPG. From the debug log I can tell that that is the case for you.

    Could you please download and install our latest GPG Suite nightly build and see if it solves your problem. That page also has sig and SHA256 to verify the download.

    Disclaimer: This is a development version which has not been thoroughly tested yet - bugs or crashes are to be expected. Thanks for helping us test.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac