Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ENOENT: no such file or directory, open '/usr/bin/ldd' #19

Open
milahu opened this issue Dec 3, 2022 · 1 comment
Open

Error: ENOENT: no such file or directory, open '/usr/bin/ldd' #19

milahu opened this issue Dec 3, 2022 · 1 comment

Comments

@milahu
Copy link

milahu commented Dec 3, 2022

this is on nixos linux, where there is no /usr/bin/ldd

the only FHS binaries in nixos are /usr/bin/env and /bin/sh

both files are symlinks

stat /usr/bin/env /bin/sh  | grep File

  File: /usr/bin/env -> /nix/store/xq4g38m5ppg78z7bzfxyy2s8ii693k74-coreutils-9.1/bin/env
  File: /bin/sh -> /nix/store/rcr0k2c7yl708k264k2jb9f6zdzglbz7-bash-interactive-5.1-p16/bin/sh
@h-banii
Copy link

h-banii commented Jul 20, 2024

I just had the same issue...

The error happens because it tries to read /usr/bin/ldd (this does not work well on non-FHS)

isMusl = readFileSync('/usr/bin/ldd', 'utf8').includes('musl')

isMusl = readFileSync('/usr/bin/ldd', 'utf8').includes('musl')

A possible workaround is to just symlink it (configuration.nix)

systemd.tmpfiles.rules = [
  "L+    /usr/bin/ldd   -    -    -     -    ${lib.getBin pkgs.glibc}/bin/ldd"
];

But the thing is... that binding.js file is auto-generated by napi-rs when you run npm build, and this new generated version seems to have fixed it.

This can be seen on this recent MR #25, which is completely unrelated to this issue, but ends up fixing it by accident because it was built with a more recent version of napi-rs (I assume).

i.e.: This issue could be easily resolved by simply updating napi-rs and running npm build... But I think this repository is abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants