How can I fix the gpg-agent: Bad CPU type problem?

Solution 1:

Most probably you have gpg-agent installed in a 32-bit version. macOS 10.15 only supports 64-bit programs, so it tells you the CPU type in the executable is not supported.

The fix is to reinstall gpg-agent in the 64-bit version.

You can check the type of executable by running the following in the Terminal:

file /usr/local/bin/gpg-agent

Most probably it will say:

/usr/local/bin/gpg-agent: Mach-O executable i386

Here "i386" means that it is compiled for a 32-bit CPU architecture.

After replacing gpg-agent with the 64-bit version, you should see an output like:

/usr/local/bin/gpg-agent: Mach-O 64-bit executable x86_64