sha3 和以太坊迷雾编译错误


Unhandled rejection Error: Error: npm exited with code 1
Output:
> sha3@1.2.0 install /home/user/mist/dist_mist/app/node_modules/sha3
> node-gyp rebuild
make: Entering directory '/home/user/mist/dist_mist/app/node_modules/sha3/build'
CXX(target) Release/obj.target/sha3/src/addon.o
sha3.target.mk:96: recipe for target 'Release/obj.target/sha3/src/addon.o' failed
make: Leaving directory '/home/user/mist/dist_mist/app/node_modules/sha3/build'
Error output:
In file included from /usr/include/stdint.h:25:0,
from /usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:9,
from /home/user/.electron-gyp/.node-gyp/iojs-1.4.15/deps/v8/include/v8.h:19,
from /home/user/.electron-gyp/.node-gyp/iojs-1.4.15/src/node.h:42,
from ../src/addon.cpp:1:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.10.0-28-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/mist/dist_mist/app/node_modules/sha3
gyp ERR! node -v v8.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sha3@1.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sha3@1.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

在 Ubuntu 16.04 上: 在~/mist运行gulp --linux后,我收到此错误。 我尝试研究sha3错误,我找到了类似的帖子,但找不到解决方案。

我该怎么做才能解决? 谢谢。

尝试安装truffle盒时遇到同样的问题。安装sha3依赖项时出现问题。

以某种方式使用特定版本的nvm可以解决问题。

$ nvm install 10.16.0
$ nvm alias default 10.16.0

输入:npm install sha3,然后sudo yarn这将适用于

最新更新