Failed to install or refresh a snap: 'core16' does not exist or is not available on the desired channel 'latest/stable'. Use `snap info core16` to get a list of channels the snap is available on.
core16 is distinct from core: it is built like core18 is without an included copy of snapd and associated tools (instead having them provided by the snapd snap).
I think the main problem here is that nothing has been published in the stable channel for core16 yet, likely because it is not yet stable. Iām not sure if Snapcraft has a way to build snaps against an unstable base. It seems like you should be able to enable it some how though: if only for the benefit of people developing base snaps.
Iām not sure if Snapcraft has a way to build snaps against an unstable base.
Iāve just built an snap against core16. But I canāt release it as stable since if I change the grade to stable I get the error message (during the priming stage):
Snap 'grade' was set to 'stable' but must be 'devel'.
Recommended resolution:
Set 'grade' to 'devel' or use a stable base for this snap.
I can link to the source code later, but here is the snapcraft.yaml:
name: mg-thibran
version: 'master'
summary: OpenBSD micro Emacs clone
description: |
mg is intended to be a small, fast, and portable editor for
people who can't (or don't want to) run emacs for one reason
or another, or are not familiar with the vi editor. It is
compatible with emacs because there shouldn't be any reason to
learn more editor types than emacs or vi.
https://man.openbsd.org/mg.1
grade: devel # stable devel
confinement: strict # strict devmode
base: core16
version-script: |
cd parts/mg/src
echo $(git rev-parse HEAD | cut -c1-7)
apps:
mg:
command: bin/mg
plugs: [home]
parts:
mg:
plugin: make
source: "https://github.com/hboetes/mg.git"
source-depth: 1
make-parameters: ["STATIC=yesplease"]
build-packages:
- libbsd-dev
- libncurses5-dev
- pkg-config
- gcc
organize:
usr/local/bin/mg: bin/mg
usr/local/man/man1/mg.1: usr/share/man/man1/mg.1
stage:
- -usr/local
If you want to build a snap against an Ubuntu 16.04-like environment, just use base: core. With that said, Iād strongly recommend looking at core18 or core20 for new work.
FYI, itās forcing grade ādevelā because core16 is not available in the stable channel. That message could be improved a bit. Use core, or better yet, as jamesh said core18 or core20 if possible.