FileNotFoundError: [Errno 2] No such file or directory:

Can anyone tell me why I am getting This error when snapping?

Installing /home/verus/Projects/lds-crude-vb/parts/lds-crude-vb/install/bin/lds_crude_vb
Staging lds-crude-vb
Priming lds-crude-vb
Sorry, Snapcraft ran into an error when trying to running through its
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/verus/Projects/lds-crude-vb/prime/bin/lds-crude-vb’

I have looked at some of the other related posts and no help. lds-crude-vb does exist in the prime/bin folder. My yaml looks like:

name: lds-crude-vb
version: ‘1.0.0’
summary: An application.
description: |
Performs a function.

grade: devel
confinement: devmode

apps:
lds-crude-vb:
command: bin/lds-crude-vb
daemon: simple
restart-condition: always
plugs: [network]

parts:
lds-crude-vb:
source: .
plugin: rust
build-attributes: [no-system-libraries]
rust-revision: 1.24.0

You shouldn’t remove any files installed by snapcraft into the stagedir and primedir except by excluding it via the stage and prime keywords because snapcraft tracks all files installed by each part.

Clean the entire primedir by running snapcraft clean --step=prime to resolve this error

note that lds_crude_vb is not equal to lds-crude-vb

1 Like

Wow, not sure how I missed that. Thank you!

no problem :slight_smile: I overlook similar things far too often, also…