Node.js   发布时间:2022-04-24  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了node.js – npm安装时失败,找不到错误大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
当我尝试在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 @R_640_6756@

解决方法

你使用的是什么操作系统?

如果是Ubuntu,你需要像这样安装build-essential包:

$ sudo apt-get install build-essential

然后重试以安装软件包。

大佬总结

以上是大佬教程为你收集整理的node.js – npm安装时失败,找不到错误全部内容,希望文章能够帮你解决node.js – npm安装时失败,找不到错误所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。