sh: node-pre-gyp: command not found 解决办法

sh: node-pre-gyp: command not found 解决办法

我的解决流程如下。首先分析 sh 提示 node-pre-gyp 命令没有发现,尝试yum安装这个命令看看是否存在。

提示不存在:

yum install node-pre-gyp
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile

  • webtatic: us-east.repo.webtatic.com
    No package node-pre-gyp available.
    Error: Nothing to do

那该怎么办呢?

用npm install 试一下,命令如下:

npm install node-gyp

问题解决。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注