【发布时间】:2021-01-22 09:19:56
【问题描述】:
我正在尝试在 alpine docker 上从源代码安装节点。
wget https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz
tar -xvf node-v14.4.0-linux-x64.tar.xz
一旦我尝试运行它:
~/node-v14.4.0-linux-x64/bin # ./node
sh: ./node: not found
虽然文件在这里,但我有权限并且可以执行
~/node-v14.4.0-linux-x64/bin # ls -la
total 70376
drwxr-xr-x 2 root root 4096 Oct 7 11:53 .
drwxr-xr-x 6 1001 1001 4096 Oct 7 11:53 ..
-rwxr-xr-x 1 root root 72052312 Jun 2 14:33 node
lrwxrwxrwx 1 root root 38 Oct 7 11:53 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root 38 Oct 7 11:53 npx -> ../lib/node_modules/npm/bin/npx-cli.js
当我在 ubuntu 上执行相同操作时,它可以工作。
【问题讨论】: