On Ubuntu 22.04 over windows (WSL) when I try to run node I get the error:
-bash: /usr/bin/node: cannot execute binary file: Exec format error
I tried to reinstall it with
sudo apt install --reinstall nodejsAnd when it didn't help to completely uninstall it and npm and install them fresh.
running file on the file gives the same result as running it on ls which works.
$ file /usr/bin/node/usr/bin/node: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d7abab52c01bf27bc053d24b0fad7f95c9e50d2f, for GNU/Linux 3.2.0, stripped$ file /usr/bin/ls/usr/bin/ls: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=897f49cafa98c11d63e619e7e40352f855249c13, for GNU/Linux 3.2.0, strippedHow can I fix my node?
MY WSL and Windows versions:
WSL version: 2.2.4.0Kernel version: 5.15.153.1-2WSLg version: 1.0.61MSRDC version: 1.2.5326Direct3D version: 1.611.1-81528511DXCore version: 10.0.26091.1-240325-1447.ge-releaseWindows version: 10.0.22621.3880Ubuntu distribution:
No LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 22.04.3 LTSRelease: 22.04Codename: jammy