Got an error after publishing my first latest/stable snap

While i was publishing my stable release of only-the-essentials i got this error on multipass: ubuntu@foo:~$ only-the-essentials cannot snap-exec: cannot exec "/snap/only-the-essentials/2/bin/only-the-essentials": exec format error After this error i tried to refresh my snap onto my local laptop and I got the same error there!

Hi ! @memelian4.

Can you show the content of your *.yaml file ?

Perhaps, you should rebuild your snap ! :thinking:

Here is the snapcraft.yaml: only-the-essentials/snapcraft.yaml at main · ilianTsonev/only-the-essentials · GitHub

That didn’t worked. it just changed the revision.

@memelian4 , in this file only-the-essentials.sh

Add this line, the below line has to be the first line of the file:

#!/bin/bash

Then, rebuild your snap

1 Like

Thank you! That worked!

1 Like

Friendly reminder.

Please consider use craftctl instead of snapcraftctl tool, cause it already be deprecated on core22 and above.

https://snapcraft.io/docs/using-craftctl

It’s a easy change. snapcraftctl build --> craftctl default

1 Like