saturneric / GpgFrontend

A free, open-source, robust yet user-friendly, compact and cross-platform tool for OpenPGP encryption. It stands out as an exceptional GUI frontend for the modern GnuPG (gpg).
https://gpgfrontend.bktus.com
GNU General Public License v3.0
495 stars 48 forks source link

"gpg not installed correctly"? #78

Closed sycam0r-e closed 1 year ago

sycam0r-e commented 2 years ago

OS: macOS 12.5.1 (21G83) gpg: 2.3.7_1


When starting GPGFrontend, I get the following warning:

Gnupg(gpg) is not installed correctly, please follow the ReadME instructions in Github to install Gnupg and then open GpgFrontend.

However, I do have the latest gpg installed via brew. Could it be a problem that I use brew on a non-admin account? On my system, brew is installed in /Users/user/homebrew/bin/gpg (where "user" is my non-admin user account). Note that I on purpose separate my admin and user account so making my user account admin is not an option.

How can this be solved?:)

saturneric commented 1 year ago

It may be a problem on libgpgme. Thanks for discovering this bug. I'll make a plan to work on it in two weeks.

Sercurio commented 1 year ago

Up, getting same error same installation of gnupgp via brew and gpgfrontend via the installer

saturneric commented 1 year ago

The work is still under way now. This might be an issue on gpgme.

saturneric commented 1 year ago

According to the gpgme‘s source code which I have read, can you execute "gpgconf" in the command line? If not, add "/Users/user/homebrew/bin/" in the PATH, everything might work.

Robbepop commented 1 year ago

I just encountered this bug. I tried to setup a new MacOS, installed homebrew and gpgfrontend via brew install --cask gpgfrontend but when starting gpgfrontned says "gnupg(gpg) seems to be installed incorrectly". Not sure what to do since the only thing it does is to recommend installing gpgfrontend exactly the way I did.

edit: I fixed the issue on my machine. The problem apparently was that gpgtools was not installed on my system. I had to install it manually since it is missing in brew for reasons that are unclear to me. I am very new to MacOs.

hnykda commented 1 year ago

Still an issue on latest Brew version and Mac OS X Ventura.

According to the gpgme‘s source code which I have read, can you execute "gpgconf" in the command line? If not, add "/Users/user/homebrew/bin/" in the PATH, everything might work.

I can execute it just fine, so it's not a path issue.

Haarolean commented 1 year ago

I have the same problem with the latest release downloaded from releases page

% which gpg
/opt/homebrew/bin/gpg
% which gpgconf
/opt/homebrew/bin/gpgconf
saturneric commented 1 year ago

In my MacBook, GnuPG binaries are installed by Homebrew at "/usr/local/bin/". This might be the key to the issue.

Haarolean commented 1 year ago

In my MacBook, GnuPG binaries are installed by Homebrew at "/usr/local/bin/". This might be the key to the issue.

It shouldn't, though. /usr is not a writable directory in newer MacOS versions anymore, that's why brew installs its packages into /opt. Anyway, gpg is present in my path but it still is not recognizable. Also, I tried adjusting the gpg path in settings, setting it to brew's bin directory, but it still doesn't work. Any way to debug this?

saturneric commented 1 year ago

In my MacBook, GnuPG binaries are installed by Homebrew at "/usr/local/bin/". This might be the key to the issue.

It shouldn't, though. /usr is not a writable directory in newer MacOS versions anymore, that's why brew installs its packages into /opt. Anyway, gpg is present in my path but it still is not recognizable. Also, I tried adjusting the gpg path in settings, setting it to brew's bin directory, but it still doesn't work. Any way to debug this?

When the Application starts, GpgME needs to find "gpgconf" in PATH, execute it and get the location of reset GnuPG's executables. If GpgME doesn't get any valid location, GpgFrontend will check out it and notice user that "gpg not installed correctly".

When you execute "gpgconf", it will output like the following (in my MacBook).

gpg:OpenPGP:/usr/local/Cellar/gnupg/2.4.0/bin/gpg
gpgsm:S/MIME:/usr/local/Cellar/gnupg/2.4.0/bin/gpgsm
keyboxd:Öffentliche Schlüssel:/usr/local/Cellar/gnupg/2.4.0/libexec/keyboxd
gpg-agent:Geheime Schlüssel:/usr/local/Cellar/gnupg/2.4.0/bin/gpg-agent
scdaemon:Smartcard:/usr/local/Cellar/gnupg/2.4.0/libexec/scdaemon
dirmngr:Netz:/usr/local/Cellar/gnupg/2.4.0/bin/dirmngr
pinentry:Passwort Eingabe:/usr/local/opt/pinentry/bin/pinentry

Can you check and paste the "gpgconf" output here?

Haarolean commented 1 year ago

Yes, please:

% gpgconf
gpg:OpenPGP:/opt/homebrew/Cellar/gnupg/2.3.8/bin/gpg
gpgsm:S/MIME:/opt/homebrew/Cellar/gnupg/2.3.8/bin/gpgsm
keyboxd:Public Keys:/opt/homebrew/Cellar/gnupg/2.3.8/libexec/keyboxd
gpg-agent:Private Keys:/opt/homebrew/Cellar/gnupg/2.3.8/bin/gpg-agent
scdaemon:Smartcards:/opt/homebrew/Cellar/gnupg/2.3.8/libexec/scdaemon
dirmngr:Network:/opt/homebrew/Cellar/gnupg/2.3.8/bin/dirmngr
pinentry:Passphrase Entry:/opt/homebrew/opt/pinentry/bin/pinentry
hnykda commented 1 year ago

Mine is (Macbook Air M2):

$ gpgconf
gpg:OpenPGP:/opt/homebrew/Cellar/gnupg/2.4.0/bin/gpg
gpgsm:S/MIME:/opt/homebrew/Cellar/gnupg/2.4.0/bin/gpgsm
keyboxd:Public Keys:/opt/homebrew/Cellar/gnupg/2.4.0/libexec/keyboxd
gpg-agent:Private Keys:/opt/homebrew/Cellar/gnupg/2.4.0/bin/gpg-agent
scdaemon:Smartcards:/opt/homebrew/Cellar/gnupg/2.4.0/libexec/scdaemon
dirmngr:Network:/opt/homebrew/Cellar/gnupg/2.4.0/bin/dirmngr
pinentry:Passphrase Entry:/opt/homebrew/opt/pinentry/bin/pinentry
saturneric commented 1 year ago

Guys, I can provide you with a BETA version which may solve this problem after you set the custom GnuPG path. Thought I cannot upgrade my MacBook sadly, can I have you help me to test this version? @hnykda @Haarolean

hnykda commented 1 year ago

I can try!

saturneric commented 1 year ago

I will upload the BETA version later.

When GpgFrontend can't find gpgconf, you can see this Dialog.

image

Click open and select a custom GnuPG path. For your MacBook, it may be /opt/homebrew/bin/.

image
saturneric commented 1 year ago

@hnykda, You can download it HERE.

hnykda commented 1 year ago

image

Seems to be working, thanks!

Haarolean commented 1 year ago

@saturneric can I get one as well? The link you shared has expired.

saturneric commented 1 year ago

@saturneric can I get one as well? The link you shared has expired.

Since v2.1.1 will not come very soon, I will make the share link longer for anyone who is in trouble.

Download it HERE.

Haarolean commented 1 year ago

@saturneric it works fine now, thank you very much for your work! ❤️