wsl1安装nodejs无法运行

好像有一次更新完涉及到nodejs的地方就出了一些乱七八糟的问题, 最近因为又回到js, 考虑好好把问题解决一下了, 系统情况如下:

OS: Arch Linux on Windows 10 x86_64
Kernel: 4.4.0-19041-Microsoft
CPU: 11th Gen Intel i5-11300H (8) @ 3.110GHz

使用的是微软的wsl1, 更新到最新了, 输入node提示如下:

[root_cn@archlinux ~]$ sudo pacman -Syu
:: Synchronizing package databases...
 core downloading...
 extra downloading...
 archlinuxcn downloading...
 multilib downloading...
:: Starting full system upgrade...
 there is nothing to do
[root_cn@archlinux ~]$ node
-bash: /usr/sbin/node: cannot execute binary file: Exec format error

相关的资料只找到了linux服务器安装nodeJS步骤及踩坑记录..., 但是能检查过的都检查了, 明显对不上.
本着哪里有问题找哪里的精神试着逆向了一下, 但是反编译失败:

[root_cn@archlinux nodejs]$ retdec node
Running phase: 开始进行反编译 ( 0.08s )
No matching plugins found for 'GCC 14.2.1'
No matching plugins found for 'GCC 4.7.0'
Running phase: Initialization ( 3.30s )
Running phase: Providers initialization ( 3.30s )
Running phase: Input binary to LLVM IR decoding ( 8.78s )
[capstone2llvmir]: Should not be possible.

感觉有点麻烦, 自己在试着解决, 不过也在这里问一下, 说不定有解决方案, 先谢谢啦.

怎么还有人在用 wsl1。换 wsl2 或者 linux 系统吧。

wsl1相比2来说打开更快, 支持以windows形式直接打开文件, 对于一些特殊工作者来说更需要wsl1的环境.

对,但是它的兼容性问题很大。

wsl的问题可以到wsl的github issue里找:

https://github.com/microsoft/WSL/issues/12359