Snapcraft errors with "no such file or directory"

this is my snapcraft.yaml, after I run the command “snapcraft”, I got an error “[Errno 2] No such file or directory: ‘/home/luhx/Projects/snap/duplicity/snap/prime/bin/aliyunduplicity’” . Please give some help . Thank you .
---------------------------------------------------------------------------------------file content --------------------------
name: aliyunduplicity
version: ‘1.0.0’
summary: aliyun oss duplicity supports full/incremental backup.
description: |
This is duplicity with Aliyun interface.

grade: devel
confinement: devmode

apps:
aliyunduplicity:
command: bin/aliyunduplicity

parts:
aliyunduplicity:
plugin: dump
source: /home/luhx/Downloads/duplicitysource
---------------------------------------------------------------------------------------file content above--------------------------
luhx@ubuntu:~/Projects/snap/duplicity/snap$ snapcraft
Skipping pull aliyunduplicity (already ran)
Skipping build aliyunduplicity (already ran)
Skipping stage aliyunduplicity (already ran)
Skipping prime aliyunduplicity (already ran)
[Errno 2] No such file or directory: ‘/home/luhx/Projects/snap/duplicity/snap/prime/bin/aliyunduplicity’

Thank you .

1 Like

Try to run “snapcraft clean”.

I’ve seen that error myself at least once when I changed the source of one of my parts.

@sergiusens There’s probably a small bug to be fixed here.

Hello , I have run “snapcraft clean” , but it still cannot work .
In this snap, I just want to snap an excutable file with its lib , which are in local disk all. Could you give me an example according to my reqeust. Thank you . I have not found any example like this in the docs.

Thank you all, I have solved this problem. add "organize " …

parts:
aliyunduplicity:
plugin: dump
source: /home/luhx/Downloads/duplicitysource
organize:
aliyunduplicitylib: aliyunduplicity
aliyunduplicity: bin/aliyunduplicity