0

If I log in my account (osx 10.15.6), I get from the start-gpg-agent.app an error message:

error "sh: /usr/local/bin/gpg-agent: Bad CPU type in executable" number 126

How can I fix it? Apple support recommend to change the default shell to zsh. But this not change the error.

1
  • Then Apple support are giving the wrong advice. But as gpg-agent is not an apple program then how are they expected to know. How did you install it?
    – mmmmmm
    Sep 22, 2020 at 22:14

1 Answer 1

3

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
4
  • 1
    You can check this with file /usr/local/bin/gpg-agent -- if it lists the type as "Mach-O executable i386", it's 32-bit only. To work under Catalina, it should be "Mach-O 64-bit executable x86_64" (or "Mach-O universal binary" including that). Sep 22, 2020 at 21:46
  • Thanks!! Should I only update gpg-agent not start-gpg-agent.app?
    – Gerd
    Sep 23, 2020 at 7:15
  • I would just update the whole thing - you want to be updated anyways.
    – jksoegaard
    Sep 23, 2020 at 8:13
  • Hi I'm seeing the same issue for yq, I'm not familiar with Mac system, can I ask how I can update it from 32-bites to 64-bites? I raised a new question here: stackoverflow.com/questions/70972303/…
    – Cecilia
    Feb 3, 2022 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .