← Back to issue list

running snapcraft for the first time on debian12

View original Github issue

Metadata

Project
snapcraft
Number
#4442
Type
issue
State
closed
Author
yvs2014
Labels
—
Created
Updated
Closed

Current evaluation

Debian 12 LXD setup failure was self-resolved: reporter had missed relogging after `usermod -a -G lxd` and re-initialising LXD/snapcraft. Issue closed in favour of the reporter's follow-up comment; no snapcraft code change was made.

Resolution: closed not a bug

Reason: The only follow-up comment (2023-11-11) was from the reporter, who identified the missing steps (relogin after adding to the lxd group plus reinitialising LXD and snapcraft) and got snapcraft running. No PR or commit addresses this; the failure was incomplete user setup on an unsupported host rather than a snapcraft defect.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description Hello, Not sure it's relevant to snapcraft or lxd itself (I've tried to run snapcraft). Is it possible to use `snapcraft` on Debian? If it's relevant to snapcraft, below steps of trying to run it: <details> <summary>with snapcraft installed from snap got these errors (installing firstly)</summary> ``` % lsb_release -a Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm ``` ``` % sudo snap install snapcraft --classic ... [no errors] ``` ``` % snapcraft LXD is required but not installed. Do you wish to install LXD and configure it with the defaults? [y/N]: y lxd 5.19-31ff7b6 from Canonical✓ installed sudo: lxd: command not found Traceback (most recent call last): File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/lxd.py", line 140, in wait_ready subprocess.run(cmd, check=True) File "/snap/snapcraft/9726/usr/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['sudo', 'lxd', 'waitready']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/snap/snapcraft/9726/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 255, in run _run_dispatcher(dispatcher, global_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 265, in run super().run(parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 138, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 216, in run _run_command( File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 262, in _run_command _run_in_provider(project, command_name, parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 490, in _run_in_provider providers.ensure_provider_is_available(provider) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/providers.py", line 148, in ensure_provider_is_available LXDProvider.ensure_provider_is_available() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/lxd_provider.py", line 69, in ensure_provider_is_available install() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/installer.py", line 67, in install lxd.wait_ready(sudo=sudo) File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/lxd.py", line 142, in wait_ready raise LXDError( craft_providers.lxd.errors.LXDError: Failed to wait for LXD to get ready. * Command that failed: 'sudo lxd waitready' * Command exit code: 1 ``` ``` ``` </details> after installing `lxd` manually ``` % sudo snap remove lxd ... [no errors] % sudo snap install lxd ... [no errors] ``` got another one error <details> <summary>errors after that</summary> ``` % snapcraft Traceback (most recent call last): File "/snap/snapcraft/9726/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 255, in run _run_dispatcher(dispatcher, global_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 265, in run super().run(parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 138, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 216, in run _run_command( File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 262, in _run_command _run_in_provider(project, command_name, parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 490, in _run_in_provider providers.ensure_provider_is_available(provider) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/providers.py", line 148, in ensure_provider_is_available LXDProvider.ensure_provider_is_available() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/lxd_provider.py", line 70, in ensure_provider_is_available ensure_lxd_is_ready() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/installer.py", line 132, in ensure_lxd_is_ready raise errors.LXDError( craft_providers.lxd.errors.LXDError: LXD requires additional permissions. Ensure that the user is in the 'lxd' group. Visit https://linuxcontainers.org/lxd/getting-started-cli/ for instructions on installing and configuring LXD for your operating system. ``` </details> following suggested `Ensure that the user is in the 'lxd' group`: <details> <summary>with user added to lxd group</summary> ``` % sudo usermod -a -G lxd "$(whoami)" % snapcraft Traceback (most recent call last): File "/snap/snapcraft/9726/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 255, in run _run_dispatcher(dispatcher, global_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 265, in run super().run(parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 138, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 216, in run _run_command( File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 262, in _run_command _run_in_provider(project, command_name, parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 490, in _run_in_provider providers.ensure_provider_is_available(provider) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/providers.py", line 148, in ensure_provider_is_available LXDProvider.ensure_provider_is_available() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/lxd_provider.py", line 70, in ensure_provider_is_available ensure_lxd_is_ready() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_providers/lxd/installer.py", line 132, in ensure_lxd_is_ready raise errors.LXDError( craft_providers.lxd.errors.LXDError: LXD requires additional permissions. Ensure that the user is in the 'lxd' group. Visit https://linuxcontainers.org/lxd/getting-started-cli/ for instructions on installing and configuring LXD for your operating system. ``` </details> ### To Reproduce steps from the section "Bug Description" ### Environment ``` % lsb_release -a Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm ``` <details> <summary>dpkg -s snapd</summary> ``` Package: snapd Status: install ok installed Priority: optional Section: devel Installed-Size: 59946 Maintainer: Michael Hudson-Doyle <mwhudson@debian.org> Architecture: amd64 Source: snapd (2.57.6-1) Version: 2.57.6-1+b5 Replaces: snap-confine (<< 2.23), snapd-xdg-open (<= 0.0.0), ubuntu-core-launcher (<< 2.22), ubuntu-snappy (<< 1.9), ubuntu-snappy-cli (<< 1.9) Depends: adduser, apparmor (>= 2.10.95-5), ca-certificates, gnupg1 | gnupg, openssh-client, squashfs-tools, systemd, udev, libapparmor1 (>= 2.7.0~beta1+bzr1772), libc6 (>= 2.34), libcap2 (>= 1:2.10), libseccomp2 (>= 2.5.0), libudev1 (>= 183), default-dbus-session-bus | dbus-session-bus Recommends: gnupg Suggests: zenity | kdialog Breaks: snap-confine (<< 2.23), snapd-xdg-open (<= 0.0.0), ubuntu-core-launcher (<< 2.22), ubuntu-snappy (<< 1.9), ubuntu-snappy-cli (<< 1.9) Conflicts: snap (<< 2013-11-29-1ubuntu1) Conffiles: /etc/apparmor.d/usr.lib.snapd.snap-confine.real b7e64e65a9b069d8007643335eb07608 /etc/apt/apt.conf.d/20snapd.conf e0e08d8267c66b9f81340dd6500cb67a /etc/profile.d/apps-bin-path.sh cf10aed8bb987ded8b7f4ba4303c1e9b /etc/xdg/autostart/snap-userd-autostart.desktop 4aaaa2fe36462a072a72e09cad553362 Description: Daemon and tooling that enable snap packages Install, configure, refresh and remove snap packages. Snaps are 'universal' packages that work across many different Linux systems, enabling secure distribution of the latest apps and utilities for cloud, servers, desktops and the internet of things. . Start with 'snap list' to see installed snaps. Built-Using: golang-1.19 (= 1.19.8-2), golang-check.v1 (= 0.0+git20200902.038fdea-1), golang-dbus (= 5.1.0-1), golang-github-boltdb-bolt (= 1.3.1-7), golang-github-coreos-go-systemd (= 22.3.2-1), golang-github-gorilla-mux (= 1.8.0-1), golang-github-juju-ratelimit (= 1.0.1-1.1), golang-github-mvo5-goconfigparser (= 0.2.2-1), golang-github-seccomp-libseccomp-golang (= 0.10.0-3), golang-go-flags (= 1.4.0-6), golang-go.crypto (= 1:0.4.0-1), golang-golang-x-sys (= 0.3.0-1), golang-golang-x-term (= 0.3.0-1), golang-golang-x-xerrors (= 0.0~git20200804.5ec99f8-1), golang-gopkg-macaroon.v1 (= 0.0~git20150121.0.ab3940c-1.1), golang-gopkg-mgo.v2 (= 2016.08.01-7), golang-gopkg-retry.v1 (= 1.0.3-2), golang-gopkg-tomb.v2 (= 0.0~git20161208.d5d1b58-3), golang-gopkg-yaml.v3 (= 3.0.1-3), golang-pretty (= 0.3.0-1), golang-text (= 0.2.0-2), golang-yaml.v2 (= 2.4.0-4), libcap2 (= 1:2.66-4) Homepage: https://github.com/snapcore/snapd ``` </details> ### snapcraft.yaml ```shell not relevant ``` ### Relevant log output ```shell output is above ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Debian 12 LXD setup failure was self-resolved: reporter had missed relogging after `usermod -a -G lxd` and re-initialising LXD/snapcraft. Issue closed in favour of the reporter's follow-up comment; no snapcraft code change was made.
stealth/space-bunny-alpha — closed not a bug Snapcraft’s Debian 12 LXD setup failure was traced to missed relogging and reinitialization steps. The reporter corrected the setup; no code fix was required.
qwen/qwen3.6-35b-a3b — — Closed as user error. The author resolved the LXD setup and permission issues by relogging and reinitializing LXD and snapcraft. No code changes were required.
qwen/qwen3.6-35b-a3b — — Abandoned after the author resolved initial LXD permission errors by relogging and reinitializing the environment, though a subsequent execution error appeared. Closed without maintainer intervention.
qwen/qwen3.6-35b-a3b — — Resolved by author as user error. The reporter realized they forgot to relogin and reinitialize LXD and snapcraft after installation. The issue was closed without code changes.
qwen3.6-35b-a3b-mtp-q6 — — Closed as user error. The author resolved initial LXD setup issues by relogging and reinitializing the environment, but encountered a new execution error. The issue was closed without code changes.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1865230 (confidence 35%)

    Other report of LXD permission/group problems where the reporter likewise never confirmed lxd-group membership; same class of local setup issue rather than a code bug.

Related issues

Issue Project State Summary Similarity
#1912 lxd: unset SNAP to work-around LXD deb thinking it's a snap snapcraft closed The SNAP-unset workaround for LP #1746612 was rejected and PR #1912 was closed unmerged; no Snapcraft fix landed.
71%
#1750642 Snapcraft fails in LXD container on Debian 9 snapcraft (launchpad) closed Closed as stale in September 2026 because Debian 9 and the reported Snapcraft version were outdated; no fixing PR or commit was identified.
70%