Can't start gpg-agent on Ubuntu 18.04

I have upgraded Ubuntu 16.04 to Ubuntu 18.04.

When i run gpg-agent its says:

gpg-agent: relocation error: gpg-agent: symbol gcry_get_config version GCRYPT_1.6 not defined in file libgcrypt.so.20 with link time reference

What is the problem?

I want to create a gpg key for my github account but the gpg --gen-key gives

gpg: can't connect to the agent: IPC connect call failed
gpg: agent_genkey failed: No agent running
Key generation failed: No agent running

I solved it. I updated the libgcrypt to 1.8 (previous was on 1.7) and now gpg-agent works.


This happened to me as well. Run:

sudo apt-get install gpg-agent

You should then be able to create your gpg key.