gpt4 book ai didi

node.js - 在 Ubuntu 16.10 中安装哪个版本的 Node.js?

转载 作者:太空宇宙 更新时间:2023-11-03 22:45:53 25 4
gpt4 key购买 nike

我正在尝试安装Truffle在我的 Ubuntu 16.10 系统中。在此之前我需要安装node.js。不支持最新的 v8。所以我下载了 v7 并安装了它的 build-essential 工具。但是在安装 Truffle 时(sudo npm install -g truffle),我发现一个错误:

node-pre-gyp ERR! Tried to download(404): https://node-webrtc.s3.amazonaws.com/wrtc/v0.0.61/Release/node-v51-linux-ia32.tar.gz

node-pre-gyp ERR! Pre-built binaries not found for wrtc@0.0.61 and node@7.10.0 (node-v51 ABI) (falling back to source compile with node-gyp)

然后,过了一会儿,出现了这个错误:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/truffle/node_modules/chokidar/node_modules/fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"ia32"})

npm ERR! Linux 4.4.0-59-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "truffle" npm ERR! node v7.10.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1

npm ERR! wrtc@0.0.61 install: node-pre-gyp install
--fallback-to-build
npm ERR! Exit status 1

npm ERR! Failed at the wrtc@0.0.61 install script 'node-pre-gyp install --fallback-to-build'. Make sure you have the latest version of node.js and npm installed. If you do, this is most likely a problem with the wrtc package, not with npm itself. Tell the author that this fails on your system: node-pre-gyp install --fallback-to-build

Yakkety 支持哪个版本?我应该恢复到以前版本的 Ubuntu 吗?

最佳答案

您首先需要安装

sudo npm install node-pre-gyp -g

在此之后

sudo npm install -g truffle

如果仍有问题,例如C编译器安装问题用于 ubuntu 的 g++ && gcc

关于node.js - 在 Ubuntu 16.10 中安装哪个版本的 Node.js?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44275019/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com