← Back to issue list

Can't build Core20 snaps on non-snap distros

View original Github issue

Metadata

Project
snapcraft
Number
#4960
Type
issue
State
open
Author
dstathis
Labels
Status: Triaged Type: Bug
Created
2024-08-13 14:03:48+00:00
Updated
2025-04-28 14:45:27+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description When running on nixos, I get the following error from snapcraft despite lxd being installed: ``` [nix-shell:~/repos/grafana-agent-snap]$ snapcraft_legacy --use-lxd You need 'LXD' set-up to build snaps: snap support is required to continue: https://docs.snapcraft.io/installing-snapd/6735. ``` ### To Reproduce Pack a core20 charm using the `--use-lxd` flag on nixos. ### Environment snapcraft 8.2.5 lxd 5.21.1 LTS ### snapcraft.yaml ```shell name: grafana-agent version: '0.40.4' summary: A telemetry collector for sending metrics, logs, and trace data license: Apache-2.0 contact: simon.aronsson@canonical.com issues: https://github.com/canonical/grafana-agent-snap/issues source-code: https://github.com/canonical/grafana-agent-snap website: https://grafana.com description: "Grafana Agent is a telemetry collector for sending metrics, \nlogs, and trace data to the opinionated Grafana observability stack.\n" base: core20 grade: stable confinement: classic compression: lzo apps: grafana-agent: daemon: simple command: "${SNAP}/agent -config.expand-env -config.file /etc/grafana-agent.yaml" install-mode: disable restart-condition: on-failure architectures: - build-on: amd64 - build-on: arm64 parts: wrapper: plugin: dump source: ./snap/local source-type: local override-build: | cp agent-wrapper $SNAPSNAPSNAPCRAFT_PART_INSTALL/ grafana-agent: plugin: go source: https://github.com/grafana/agent source-type: git source-tag: "v0.40.4" build-snaps: - go build-packages: - build-essential - libsystemd-dev stage-packages: - libsystemd0 override-build: | export USE_CONTAINER=0 export GOFLAGS="-mod=readonly -tags=promtail_journal_enabled" make agent agentctl cp build/grafana-agent $SNAPSNAPSNAPCRAFT_PART_INSTALL/agent cp build/grafana-agentctl $SNAPSNAPSNAPCRAFT_PART_INSTALL/agentctl ``` ### Relevant log output ```shell - ``` ### Additional context _No response_

Evaluation history

No evaluation history available.