4

I've made a snapcraft.yaml for an application. It builds on my computer but a friend finds it doesn't build for him. How can I make sure a snap builds for everyone before I share it?

7

Snapcraft has a built-in cleanbuild function. It uses LXD to make a container, then it installs the needed tools in the container. It will then build your snap so you can make sure that all of the build dependencies required are present and your friend can build it just fine.

Ensure LXD is installed and running (an excellent guide by Stéphane Graber is available here), then run the following in the same directory as your snapcraft.yaml:

snapcraft cleanbuild

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.