Having two versions of GPG on Linux causes problem

Teemu Likonen tlikonen at iki.fi
Fri Jan 7 12:28:51 CET 2022


* 2022-01-07 13:45:09+0800, foods.bolds wrote:

> I installed two versions of GnuPG on Ubuntu using two package
> managers.

> It seems that GPG 2.3 invoked the old version of gpg-agent residing in
> /usr/bin. I cannot delete the old gpg because it is a dependency of
> other software.

Probably there is a systemd unit gpg-agent.socket which listens to
connections on a socket and starts unit gpg-agent.service which starts
/usr/bin/gpg-agent. If that is the case you can override the .service
unit. Write a .conf file which overrides just the ExecStart= and
ExecReload= settings, like this:

    # /etc/systemd/user/gpg-agent.service.d/my.conf
    # or maybe: # ~/.config/systemd/user/gpg-agent.service.d/my.conf
    [Service]
    ExecStart=/usr/local/bin/gpg-agent --supervised
    ExecReload=/usr/local/bin/gpgconf --reload gpg-agent

Then:

    systemctl --user stop gpg-agent.service
    systemctl --user daemon-reload

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 434 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20220107/b3d98996/attachment.sig>


More information about the Gnupg-users mailing list