Error validating snapcraft.yaml 'confinement' was unexpected

Raises an error: Issues while validating snapcraft.yaml: Additional properties are not allowed (‘confinement’ was unexpected) . Running snapcraft 2.8.4 on Ubuntu 16.04 VM. Also “prime” is not listed as a command when listing using snapcraft -h. I’ve updated all packages.

name: hello
version: ‘2.10’
summary: GNU Hello, the “hello world” snap
description: |
GNU hello prints a friendly greeting.
confinement: devmode
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotools
gnu-bash:
source: http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
plugin: autotools
configflags: ["–infodir=/var/bash/info"]
apps:
hello:
command: bin/hello
bash:
command: bash

snapcraft 2.8.4 is quite an old version, so I suspect that’s the problem. There should be a newer version available in xenial-updates if you update your VM.

better use the snapcraft snap package instead of the deb … thats definitely more up to date and independent from the distro release you run… also, please use triple backticks before and after pastes in forum posts, so the formatting does not get lost

1 Like