命令行终端中输入的命令行为:
sudo apt-get install nodejs
sudo apt-get install npm
npm init --yes
npm install web3
其中nodejs、npm都可以安装成功,但是web3一步一直安装失败:
由于图片无法上传,我简单粘贴一下失败的信息:
scrypt@6.0.3 install /usr/Geth0/node_modules/scrypt
node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp.while tryinging.gyp
gyp ERR! configure error
gyp ERR! stack Error: 'gyp' failed with exit code:
gyp ERR! stack at ChildProcess.onCpExit(/usr/srgre/node-gyp/lib/configure.js:354:16)
后面还有一部分信息,比较多,就省略一下,
辛苦帮忙解答一下为什么安装web3会出现上面的错误,该如何解决,感谢: