I am trying to package my first snap with the ultimate goal of deploying an app on Ubuntu Core 20. I am new to snapcraft and multipass, so I'm following the "Create Your First Snap" tutorial on the Ubuntu website.
I am building on a Raspberry Pi 4, running Ubuntu Server 20.04 LTS. Once the snap is packaged, I want to then be able to copy it to another Raspberry Pi 4 which is running Ubuntu Core 20.
I have followed the instructions carefully.. installed snapcraft, initialised a new snap, and edited the snapcraft.yaml file with the example content from the tutorial:
name: hello
base: "core18"
version: '2.10'
summary: GNU Hello, the "hello world" snap
description: |
GNU hello prints a friendly greeting.
grade: devel
confinement: devmode
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotools
When I run the snapcraft
command, I get the following output:
Launching a VM.
Build environment is in unknown state, cleaning first.
info failed: The following errors occurred:
instance "snapcraft-hello" does not exist
launch failed: Unable to find an image matching "core18". Please use `multipass find` for supported remotes and images.
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
When I run multipass find
I get:
Image Aliases Version Description
18.04 bionic 20211021 Ubuntu 18.04 LTS
20.04 focal,lts 20211021 Ubuntu 20.04 LTS
21.04 hirsute 20211025 Ubuntu 21.04
21.10 impish 20211014 Ubuntu 21.10
daily:22.04 devel,jammy 20211025 Ubuntu 22.04 LTS
anbox-cloud-appliance latest Anbox Cloud Appliance
minikube latest minikube is local Kubernetes
Can someone please help me understand what I'm missing, and why it can't find Core18?
Cheers!
- Josh