Hello I am trying to run the supabase cli. First installing it through npm pnpm i -g supabase
When trying to run it with
$ supabase
I get the following error
/home/alexander/.local/share/pnpm/supabase: line 13: /home/alexander/.local/share/pnpm/global/5/node_modules/supabase/bin/supabase: No such file or directory
However I can run it with steam-run and that has worked fine, but I would like it to work wothout steam-run.
After running ldd ~/.local/share/pnpm/global/5/node_modules/supabase/bin/supabase
I get the following output:
No such file or directory relates to the runtime dynamic linker, or you can say dynamic ELF interpreter. Most GNU/Linux distros have an executable like /lib/ld-linux-x86-64.so.2 that helps load the dependencies (like libc.so.6) of a binary. On NixOS, however, different binaries can have different versions of runtime dynamic linker, and all the versions live in /nix/store/. The linker is stored in the executable as an absolute path, so downloaded binaries have a problem here.
You can probably run /nix/store/lxpdbaazqd2s79jx6lngr8nak2rjdaq1-glibc-2.34-210/lib64/ld-linux-x86-64.so.2 supabase and see it work.
Nixpkgs packages that download externally built libraries use patchelf to specify a new path for the dynamic interpreter, as well as the search paths for dynamic libraries. Note that you can also use buildFHSEnv to construct a working environment for supabase but without Steam.
I tried running the following as this was in my nix store.
$ /nix/store/psklxdgmw8w02w3lciimb1y43r9yay9m-glibc-2.35-163/lib/ld-linux.so.2 supabase
supabase: error while loading shared libraries: supabase: cannot open shared object file: No such file or directory
But as you can see it did not work.
I am also not sure how I can use buildFHSEnv.
Is there a way I can make just running supabase work? Like making a nix shell?
And follow up question: why does NixOS not provide a fallback runtime dynamic linker? Or is there an option to enable that?
$ /nix/store/psklxdgmw8w02w3lciimb1y43r9yay9m-glibc-2.35-163/lib/ld-linux.so.2 supabase
supabase: error while loading shared libraries: supabase: cannot open shared object file: No such file or directory
But as you can see it did not work.
Maybe NPM does something special…
I am also not sure how I can use buildFHSEnv.
Is there a way I can make just running supabase work? Like making a nix shell?
And follow up question: why does NixOS not provide a fallback runtime dynamic linker? Or is there an option to enable that?
Well, once there are multiple glibc’s installed, the question is «which»