Cannot install a snap on Ubuntu 16.04 LTS

Hi everyone,

I have deployed a snap for Ubuntu 20.04 LTS and it works perfectly. But I tried to change the .yaml file to adapt my snap to Ubuntu 16.04 LTS. The thing is the snap building finished successfully but when I tried to install it on a device (which is not connect connected to internet), I receive this message:

error: cannot perform the following tasks:

Have you tips to solve this issue ?

Thank you


snaps work independent from distros and releases … what exactly did you try to change to adapt my snap to Ubuntu 16.04 LTS ?

I just change the “base” parameter which was core18 for Ubuntu 20.04 and I set to “core” for Ubuntu 16.04

well, you should not need that … just make sure the core20 snap is installed too (preferably before installing the app snap)

Yes, it’s working by downloading the core snap and install it before my snap.
So now the snap is install but I get another problem now:

/snap/configure-iot/x1/command-configure-iot.wrapper: 6: exec: /snap/configure-iot/x1/usr/bin/python3: Exec format error

looks like the snap is built on/for a different architecture

It’s strange because when I type uname -a, I get “Linux ssniotr 4.13.16-sunxi #1 SMP Fri Jan 26 08:37:52 EST 2018 armv7l armv7l armv7l GNU/Linux”

And in the snapcraft.yaml, I typed:

- build-on: all
run-on: armhf

That architectures: configuration tells snapcraft that building on any platform produces a snap that is runnable on armhf. This is likely not what you want. Instead you should change it to:

- build-on: armhf
  run-on: armhf

And then you should run your build on a system that has the armhf architecture (e.g. build on a raspberry pi, not your desktop PC)


Indeed I think it could work but I installed snapcraft and Multipass on a Raspberry Pi 3B+ with the latest version of Raspbian. But I have another problem… again…
When I tried to snap my project with the command “snapcraft” I get that my CPU doesn’t support KVM extensions.
Have you an idea on how I can activate this ?

install the lxd snap (run sudo lxd.init and just hit enter everywhere) and use snapcraft --use-lxd then it will use a container instead of trying to use a VM … snapcraft should perhaps print a hint to this in the error output …

I tried this solution… But I got the same issue like yesterday:

/snap/configure-iot/x2/snap/command-chain/snapcraft-runner: 6: exec: /snap/configure-iot/x2/usr/bin/python3: Exec format error

I also tried to do the build inside my device which should run the snap at the end but I can’t install snapcraft because I got this:

error: cannot install “snapcraft”: Post dial tcp: lookup on server misbehaving