nodejs snap installed through stage-snaps is not usable in the final image
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Bug Description
nodejs snap installed through stage-snaps is not usable in the final image without additional steps.
For now, I need to use the following command to fix it inside the container:
```
mkdir -p /snap/core20/current/lib64/ && cp /lib64/ld-linux-x86-64.so.2
```
### To Reproduce
```
rockcraft pack --verbose
rockfile="$(find . -name "*.rock" -printf "%f")"
image_name="$(echo "$rockfile" | cut -d'_' -f1)"
version="$(echo "$rockfile" | cut -d'_' -f2)"
/snap/rockcraft/current/bin/skopeo --insecure-policy copy "oci-archive:$rockfile" "docker-daemon:$image_name:$version"
```
Using `docker run -it --rm --entrypoint bash localhost:32000/test:1.0` to shell-in the container allows me to try out `node --version` that fails.
### Environment
uname -a
```
Linux t14 5.19.0-40-generic #41~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 31 16:00:14 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
```
snap info rockcraft | tail
```
snap-id: 3mPIBn6L9IYLyBAZsaqjlnMk7huEtqlv
tracking: latest/edge
refresh-date: today at 11:43 EDT
channels:
latest/stable: –
latest/candidate: –
latest/beta: –
latest/edge: 0+git.2148b5b 2023-06-27 (893) 86MB classic
installed: 0+git.2148b5b (893) 86MB classic
```
### rockcraft.yaml
```shell
name: test
summary: test
description: test
base: ubuntu:20.04
license: Apache-2.0
version: "1.0"
platforms:
amd64:
parts:
snap-test:
plugin: nil
stage-snaps:
- node/18/stable
```
### Relevant log output
tty from inside the container:
```shell
root@d25c34e99a0c:/# which node
/usr/bin/node
root@d25c34e99a0c:/# node --version
bash: /usr/bin/node: No such file or directory
root@d25c34e99a0c:/# ldd /usr/bin/node
linux-vdso.so.1 (0x00007ffe0039e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbf771a5000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbf76fc3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbf76e74000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbf76e59000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbf76e36000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbf76c44000)
/snap/core20/current/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fbf7d098000)
root@d25c34e99a0c:/# mkdir -p /snap/core20/current/lib64/ && cp /lib64/ld-linux-x86-64.so.2 /snap/core20/current/lib64/ld-linux-x86-64.so.2
root@d25c34e99a0c:/# node --version
v18.16.1
```
Evaluation history
No evaluation history available.