TranslateProject/sources/tech/20220704 Fixing -cannot find signatures with metadata for snap- Error in Ubuntu and other Linux.md
2022-07-05 08:43:14 +08:00

3.4 KiB
Raw Blame History

Fixing “cannot find signatures with metadata for snap” Error in Ubuntu and other Linux

The other day I was trying to install massCode application. For installation, it provided a Snap file to download.

When I tried to install the application from Snap file

sudo snap install snap_file

It gave me the following error:

error: cannot find signatures with metadata for snap “masscode_2.6.1_amd64.snap”

cannot find signature with metadata for snap

That was strange. While adding external repositories in Ubuntu, you have to add the GPG key. But no such things were provided by the developer here.

The fix is easy and simple. Let me explain it to you.

Handling “cannot find signatures with metadata for snap” error

There are no signatures involved here.

What happens is that you have downloaded a Snap installer file from a third party. The snap mechanism in Ubuntu expects you to get the snap packages from the official snap store.

Since it doesnt come from the snap store, you see the cannot find signatures with metadata for snap error message. The error message is not descriptive, like most error messages.

So, whats the solution here?

Any snap package that is not distributed through the Snap store has to be installed with the**dangerous flag**. Thats the rule.

sudo snap install --dangerous path_to_snap_file

This way, you tell the snap package manager to explicitly install the snap package.

Here, I used this flag and was able to install massCode from its snap package successfully.

installing third party snap packages

How dangerous is it to install snap packages this way? Almost the same as downloading and installing packages in deb format.

In my opinion, if you are downloading the snap package from the project developers website, you are already entrusting the project. In such cases, you can install it with the dangerous flag.

Of course, you should first search if the package is available in the snap store or not:

snap find package_name

I hope this quick little tip helped you fix the Snap error. If you have questions or suggestions please let me know. If you want to learn more, see this guide on using Snap commands.


via: https://itsfoss.com/snap-metadata-signature-error/

作者:Abhishek Prakash 选题:lkxed 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出