After installing n
to manage node versions on my alpine vm, I am having the following issue where the node
executable is not found, despite existing
vscode ➜ /workspaces/tom $ which node -a
/usr/local/bin/node
/usr/bin/node
vscode ➜ /workspaces/tom $ which node
/usr/local/bin/node
vscode ➜ /workspaces/tom $ node -v
bash: /usr/local/bin/node: No such file or directory
vscode ➜ /workspaces/tom $ pushd /usr/local/bin
/usr/local/bin /workspaces/tom
vscode ➜ /usr/local/bin $ ls -la node
-rwxr-xr-x 1 root root 90940576 Apr 26 12:35 node
vscode ➜ /usr/local/bin $ popd
/workspaces/tom
vscode ➜ /workspaces/tom $ node -v
bash: /usr/local/bin/node: No such file or directory
vscode ➜ /workspaces/tom $ sudo node -v
sudo: unable to execute /usr/local/bin/node: No such file or directory
The file exists, which can find it, it has read and execute permissions, but when trying to execute it, it is found at its location and then reported as being none such file or directory.
What is going on?
node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
and
getconf LONG_BIT gives me 64
However it appears to be an issue with Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/bin/node)
– StuperUser Apr 26 '23 at 13:39apk add nodejs-current
. – Stephen Kitt Apr 26 '23 at 13:42/lib/ld-musl-x86_64.so.1 /usr/local/bin/node
. – Stephen Kitt Apr 26 '23 at 13:50