Why does gpg key pair generation fail with error message "/usr/bin/pinentry: line 22: xprop: command not found" ?

Solution Verified - Updated -

Issue

  • Trying to generate keys and the process fails, see below:
...................
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.

can't connect to `/home/test/.gnupg/S.gpg-agent': Connection refused
/usr/bin/pinentry: line 22: xprop: command not found
Please install pinentry-gui
gpg-agent[30566]: can't connect server: ec=4.16383
gpg-agent[30566]: can't connect to the PIN entry module: End of file
gpg-agent[30566]: command get_passphrase failed: No pinentry
gpg: problem with the agent: No pinentry
gpg: Key generation canceled.

Environment

  • Red Hat Enterprise Linux 6.6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content