当前位置: 首页 > 面试题库 >

npm的安装时间失败,显示“找不到”错误

楚瑞
2023-03-14
问题内容

当我尝试在nodejs服务器上安装时间时,出现以下错误:

time@0.8.4 install /var/www/track/node_modules/time
node-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at F (/usr/lib/nodejs/npm/node_modules/which/which.js:43:28)
gyp ERR! stack     at E (/usr/lib/nodejs/npm/node_modules/which/which.js:46:29)
gyp ERR! stack     at /usr/lib/nodejs/npm/node_modules/which/which.js:57:16
gyp ERR! stack     at Object.oncomplete (fs.js:297:15)
gyp ERR! System Linux 3.2.0-31-virtual
gyp ERR! command "node" "/usr/lib/nodejs/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/track/node_modules/time
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! time@0.8.4 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the time@0.8.4 install script.
npm ERR! This is most likely a problem with the time package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls time
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-31-virtual
npm ERR! command "nodejs" "/usr/bin/npm" "install" "time"
npm ERR! cwd /var/www/track
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/track/npm-debug.log
npm ERR! not ok code 0

问题答案:

您正在使用哪个操作系统?

如果是Ubuntu,则需要安装build-essential软件包:

$ sudo apt-get install build-essential

然后尝试再次安装该软件包。



 类似资料:
  • 问题内容: 这是我得到的错误 我该怎么解决? 问题答案: 看来你的系统上缺少或安装程序找不到它。确保确实安装了。 例如,在上,你必须安装软件包: 也许不在你的路径中,当你自己编译mysql套件时就是这种情况。 更新:对于最新版本的(截至2018年),它是

  • 我们有问题运行“NPM安装”在我们的项目。找不到某个文件: 对于我们来说,这个节点--陀螺似乎是一个永无止境的痛苦之源。一开始它抱怨它需要python,所以我们安装了它。然后它抱怨它需要我们安装的VCBuild,(使用.NET2.0SDK),现在我们出现了这个错误。这几乎就像是错误越来越模糊,感觉我们走上了一条错误的道路。 奇怪的是,我们团队中的其他人在运行NPM-Install时没有任何问题。

  • 我收到以下错误。” 线工具实例 线工具实例 线工具实例 线工具实例 停止。吉普ERR!构建错误吉普ERR!堆栈错误:失败,退出代码:2吉普ERR!堆栈在ChildP_退出(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276: 23)吉普ERR!堆栈在emitTwo(events.js:106: 13)吉普ER

  • 问题内容: 我试图在已经安装了Node 0.8.14的新Ubuntu 12.04实例上设置节点环境,但是在尝试运行时遇到了问题。因此,当我尝试时,它说我需要以root或管理员身份运行它: 但是,当尝试以sudo身份运行它时,它表示以下内容: 在我的package.json中,它包含以下脚本: 由于我已经在自己的计算机(Mac)上安装了所有的依赖关系,因此这些依赖关系是有效的。有人知道为什么会这样吗

  • 我想通过节点JS连接oracle db。为此,我尝试安装node-oracledb模块。 npm错误!此运行的完整日志可以在以下位置找到:npm err! C:\users\appdata\roaming\npm-cache_logs\2019-04-09t06_36_44_005z-debug.log 我不明白为什么需要python依赖关系才能与oracle DB连接?又该怎么做呢?

  • 我不能使用NodeJS中的命令提示符来使用。运行时出现以下错误: