Snap failing with error: Failed to install GPG key
I'm trying to create a snap for my ROS package but it fails with the following error even though dirmngr
is installed.
Failed to install GPG key: Executing: /tmp/apt-key-gpghome.5dGB3qgLls/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.5dGB3qgLls/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr
Recommended resolution:
Verify any configured GPG keys.
Detailed information:
GPG key ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GPG key server: keyserver.ubuntu.com
I really do not know how to verify configured GPG keys. How should I fix this?
Is this ROS related? Not having
dirmngr
installed is a general Ubuntu problem.This implies that you don't have
gnupg
installed, is that true? Your log is very clipped so it's impossible to know, but this gives the impression that you're running snapcraft without a build VM or a container where it manages the image. Are you using--destructive-mode
, or building in Docker or something? Assuming so, installgnupg
and you should be good.I have just confirmed that I have gnupg installed (this is version 2.2.4). Any other ideas?
I am not using
--destructive-mode
or building in Docker either. How could I make sure I am using the necessary build VM? Is there any more information needed to work out this problem?