在 v8-debug@0.4.6 安装脚本 'node-pre-gyp install --fallback-to-build 时失败

Failed at the v8-debug@0.4.6 install script 'node-pre-gyp install --fallback-to-build

使用 npm install 时遇到这个问题。 (很多其他人和其他 commands/tasks 也有这个问题)。

我添加这个问题是为了参考一个已经为很多人所用的解决方案。

russfrisch 4 天前评论:

I was experiencing this same issue. Changing in the version for grunt-node-inspector to prepend a ">=" instead of a "~" got this to work for me.

Link 到 github page 我找到这个解决方案的地方。

在 Ubuntu 16.04 上,对我有用的是升级节点

updating nodejs on ubuntu 16.04

我正在复制上面link下面的解决方案

要更新,可以安装n

sudo npm install -g n

那么就:

sudo n latest

或特定版本

sudo n 8.9.0

然后尝试安装

sudo npm install <package>