ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Snap failing with error: Failed to install GPG key

asked 2020-11-06 08:22:08 -0500

Py gravatar image

updated 2020-11-06 08:23:49 -0500

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?

edit retag flag offensive close merge delete

Comments

Is this ROS related? Not having dirmngr installed is a general Ubuntu problem.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-06 10:47:27 -0500 )edit

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, install gnupg and you should be good.

kyrofa gravatar image kyrofa  ( 2020-11-06 11:23:33 -0500 )edit

I have just confirmed that I have gnupg installed (this is version 2.2.4). Any other ideas?

Py gravatar image Py  ( 2020-11-08 07:56:02 -0500 )edit

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?

Py gravatar image Py  ( 2020-11-10 10:17:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-10 10:45:03 -0500

Py gravatar image

I managed to solve this problem after some misunderstanding about where dirmgr was installed. It turns out that this was only on my local machine rather than the VM used to build the Snap. The solution was therefore to run snapcraft --debug and then apt install dirmngr -y. After that, snapcraft runs sucessfully.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-06 08:22:08 -0500

Seen: 592 times

Last updated: Nov 10 '20