Openresty - snap sym link issue

I’m having some issues trying to create a snap from openresty web server.
When staging, I cannot copy sym links, getting this error:

Failed to copy ‘/src/resty_snap/parts/openresty/install/bin/openresty’: no such file or directory.

Tried omitting this files and works fine.


The created symlink might be pointing a wrong path, you should be able to patch it in the override-build scriptlet. Example:

      snapcraftctl build

      # Fixup wrong wx-config link
      ln \
        --force \
        --relative \
        --symbolic \
        "${SNAPCRAFT_PART_INSTALL}"/lib/wx/config/gtk3-unicode-static-3.1 \

I believe when I last worked on my openresty part for the EdgeX snap, the created symlink is absolute, and so I had to remove it and replace it with a relative symlink as @Lin-Buo-Ren points out.

See: (note that there’s some other things at play in that snapcraft.yaml, so my part may not apply to your specific snap, but in case you find it helpful)

1 Like

@Lin-Buo-Ren @ijohnson thank you guys, now it’s working perfectly

@ijohnson amazing snap, it will help me a lot!

1 Like