nvm.fish icon indicating copy to clipboard operation
nvm.fish copied to clipboard

Error executing Node.js via nvm: "Check the interpreter or linker?"

Open devxpain opened this issue 1 year ago • 1 comments

Description:

I'm encountering an issue when trying to execute Node.js installed via nvm in Termux. Despite the file being present and marked as executable, the command fails with the following error:

exec: Failed to execute process '/data/data/com.termux/files/home/.local/share/nvm/v22.9.0/bin/node': The file exists and is executable. Check the interpreter or linker?

Steps to Reproduce:

  1. Install nvm using fisher in Termux (Fish shell):

    fisher install jorgebucaran/nvm.fish
    
  2. Use nvm to install Node.js:

    nvm install latest
    
  3. Attempt to check the Node.js version:

    node -v
    
  4. The error occurs:

    exec: Failed to execute process '/data/data/com.termux/files/home/.local/share/nvm/v22.9.0/bin/node': The file exists and is executable. Check the interpreter or linker?
    

Expected Behavior:

The node -v command should correctly return the installed Node.js version.

Actual Behavior:

The command fails with the error message about the interpreter or linker.

Additional Information:

  • Termux version:
Termux Variables:
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=11475
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0

Packages CPU architecture:
aarch64

Subscribed repositories:
# sources.list
deb https://mirrors.medzik.dev/termux/termux-main stable main

Updatable packages:
All packages up to date

termux-tools version:
1.43.6

Android version:
10

Kernel build information:
Linux localhost 4.14.116 #1 SMP PREEMPT Mon Oct 16 19:13:50 CST 2023 aarch64 Android

Device manufacturer:
HUAWEI

Device model:
STK-L22

LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
  • nvm version: nvm, version 2.2.16
  • Fish version: fisher, version 4.4.5
  • Architecture: arm64

Troubleshooting Attempts:

  1. Reinstalled Node.js via nvm (same result).
  2. Attempted with both latest and lts versions (v22.9.0 and v20.18.0).
  3. Installed Node.js directly via pkg (this works correctly).

Notes:

It seems the binary downloaded by nvm might not be compatible with Termux's environment or requires specific linkers or libraries not available in Termux by default.

devxpain avatar Oct 13 '24 02:10 devxpain

Does it work outside of Termux? (Sorry if the question doesn't make sense... I'm not too familiar with Termux).

jorgebucaran avatar Oct 13 '24 10:10 jorgebucaran

Ping @devxpain

jorgebucaran avatar Oct 19 '24 19:10 jorgebucaran