I am unable to generate a gpg key through the keyring program
For me, deleting the .gnugpg
folder helped:
sudo rm -rf ~/.gnugpg
Permissions might be wrong after you ran gpg from root, making it impossible to modify one/some of the files as ordinary user "joey".
find ~/.gnupg -type d -exec sudo chown joey:joey {} \; -exec chmod 700 {} \;
find ~/.gnupg -type f -exec sudo chown joey:joey {} \; -exec chmod 600 {} \;
In case case you don't want to delete any existing keys, this will be helpful.