The gpg2 error: No such file or directory

I am trying to install spack packages on Mac. Spack can install software either from source or from a binary cache. Packages in the binary cache are signed with GPG for security, which I didn't have. So I installed it (brew instal gnugp) and linked it.

My gpg --version outputs this:

Warning: Failed to set locale category LC_NUMERIC to en_DE. Warning: Failed to set locale category LC_TIME to en_DE. Warning: Failed to set locale category LC_COLLATE to en_DE. Warning: Failed to set locale category LC_MONETARY to en_DE. Warning: Failed to set locale category LC_MESSAGES to en_DE. gpg (GnuPG) 2.2.17 libgcrypt 1.8.4 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Home: /Users/gipsyqueen/.gnupg Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2

Now, I want to install the BZIP2 package with the following command:

spack gpg trust /mirror/public.key

It doesn't work and give the following error:

==> Error: gpg2: No such file or directory Command: 'gpg2' '--import' '/mirror/public.key'

1- What is going on? 2- How do I fix it?