Snapcraft doesn't install snapcraft inside the lxd container
Metadata
Current evaluation
Historical LXD builds failed because Snapcraft was not injected into the container; the modern Craft Providers LXD path injects Snapcraft and resolves the legacy failure.
Suggested action: close resolved
Reason: Commit b2bd6b776 (canonical/snapcraft#2222), "lxd: support new style snap injection," introduced the later LXD provider path. Current snapcraft/providers.py configures BuilddBase with the Snapcraft Snap, replacing the legacy path that produced "snapcraft: not found."
Evaluated by: mr-cal-bot
Impact:
55
Quick Win:
22
Complexity:
53
Confidence:
87
Actionability:
84
Issue body
$ SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft
Creating snapcraft-multipass
Device fuse added to snapcraft-multipass
Waiting for a network connection...
Network connection established
error: no changes of type "auto-refresh" found
snap "core" is not installed
SNAPCRAFT_BUILD_ENVIRONMENT_CHANNEL_SNAPCRAFT is set: installing snapcraft from latest/stable
snap "snapcraft" is not installed
Mounting /home/michal/dev/canonical/multipass/multipass into container
Device /root/build_multipass added to snapcraft-multipass
sh: 1: snapcraft: not found
Stopping local:snapcraft-multipass
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
55
Quick Win:
22
Complexity:
53
Confidence:
87
Actionability:
84
|
close resolved | Historical LXD builds failed because Snapcraft was not injected into the container; the modern Craft Providers LXD path injects Snapcraft and resolves the legacy failure. | |
| stealth/space-bunny-alpha |
Impact:
45
Quick Win:
19
Complexity:
35
Confidence:
91
Actionability:
65
|
close resolved | A 2018 report says Snapcraft was missing inside its LXD container. The log suggests an inverted channel-status check; later provider work fixed this path by injecting the host Snapcraft snap. | |
| stealth/space-bunny-alpha |
Impact:
56
Quick Win:
23
Complexity:
48
Confidence:
86
Actionability:
78
|
close resolved | LXD builds failed because Snapcraft was missing inside the container. Later LXD snap-injection work appears to have resolved this legacy 2018 failure path. | |
| qwen/qwen3.6-35b-a3b |
Impact:
80
Quick Win:
34
Complexity:
40
Confidence:
85
Actionability:
70
|
close resolved | Snapcraft fails to install itself inside LXD containers when using SNAPCRAFT_BUILD_ENVIRONMENT=lxd, causing 'snapcraft: not found' errors. The LXD provider has since been rewritten via craft-providers. | |
| qwen/qwen3.8-27b |
Impact:
40
Quick Win:
22
Staleness:
95
Complexity:
45
Confidence:
55
Support Request:
15
|
close stale | Snapcraft's LXD build provider failed to install the snapcraft snap inside the container, leaving 'snapcraft: not found'. Reported ~8 years ago with no maintainer interaction; the provider code has since been heavily refactored (craft-providers integration). | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
20
Confidence:
95
Support Request:
10
|
close stale | Report of snapcraft failing to install itself inside an LXD build environment, causing a not found error. The issue is nearly 8 years old with no maintainer interaction or comments. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
30
Confidence:
90
Support Request:
10
|
close stale | Reports snapcraft failing to install itself inside an LXD container when using SNAPCRAFT_BUILD_ENVIRONMENT=lxd. Zero activity in nearly 8 years; the reported behavior is obsolete due to significant changes in snapcraft's build environment handling. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
20
Confidence:
90
Support Request:
10
|
close stale | Snapcraft fails to install itself inside an LXD build environment, causing the build to abort. The report is over seven years old with no maintainer interaction or updates. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#2222
(confidence 90%)
Added the modern LXD snap-injection implementation later used by the provider architecture.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1839399 snapcraft not pulling snap from lxd container | snapcraft (launchpad) | open | Snapcraft 3.7.1 reported a successful --use-lxd build but left the generated snap absent on the host; a maintainer identified possible CWD handling, and the case remains unresolved. | |
| #2014963 Snapcraft fails to build snap if Snapcraft itself is installed using `snap try` | snapcraft (launchpad) | open | `snap try` Snapcraft could not self-inject into legacy LXD builds because snapd cannot download a try snap; the affected provider is removed, but current behavior needs retesting. | |
| #719 Snapcraft fails initialization of build container | craft-providers | closed | LXD startup race was fixed by waiting for instance readiness in craft-providers PR #720; the fix shipped via Snapcraft PR #5247 in Snapcraft 8.6.2. | |
| #1892551 snapcraft fails to run if it is installed as a try snap | snapcraft (launchpad) | open | Snapcraft 4.1.5 failed in LXD builds when launched via snap try because snapd cannot export a try-snap file; the affected legacy provider is absent from the current codebase. | |
| #1825820 Snapcraft doesn't update the `snapcraft-project` disk source when the path is moved | snapcraft (launchpad) | open | LXD builds reportedly fail after moving a project because the instance retains the old disk source. LXD remains supported, but this untriaged report needs verification against the current craft-providers integration. | |
| #1364 lxd: Inject snapcraft and core snaps into the container | snapcraft | merged | Merged PR #1364 as 99f5598ac, injecting the host's Snapcraft and core snaps into LXD containers so builds no longer use a mismatched Xenial archive version. | |
| #5420 Snapcraft 7 fails to launch a LXD container based on host apt sources entries | snapcraft | closed | Closed as a duplicate of canonical/snapcraft#4408; no separate fix was made for this report. | |
| #1666735 snapcraft cleanbuild does not work with lxd installed via snap | snapcraft (launchpad) | closed | Fixed by merged canonical/snapcraft#1199 (commit 417989880), making cleanbuild LXD detection packaging-independent instead of relying on apt package metadata. | |
| #2069292 cannot install system snap "snapd" | snapcraft (launchpad) | open | Snapcraft build fails injecting host snapcraft into LXC instance ("cannot install system snap snapd"); root cause is host networking — Docker breaks LXD bridge — not a Snapcraft bug. Maintainer pointed to LXD/Docker firewall docs; reporter has not confirmed fix. | |
| #1746612 Snapcraft cleanbuild doesn't work if you're not using the LXD snap | snapcraft (launchpad) | closed | Closed after the missing hostfs behavior was fixed upstream in lxc/lxd#4183. Snapcraft PR #1912 offered a workaround but was not merged. |