之前我已经安装了一些软件包没有任何问题,但有了这个,我尝试了很多相同的结果。
user@laptop:~/Mayhem/server/node_modules$ npm install speaker
npm WARN package.json spotify-server@0.0.0 No README.md file found!
npm http GET https://registry.npmjs.org/speaker
npm http 304 https://registry.npmjs.org/speaker
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/nan
speaker@0.1.2 install /home/user/Mayhem/server/node_modules/speaker
node-gyp rebuild
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! speaker@0.1.2 install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the speaker@0.1.2 install script.
npm ERR! This is most likely a problem with the speaker 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 speaker
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-20-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "speaker"
npm ERR! cwd /home/user/Mayhem/server/node_modules
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/user/Mayhem/server/node_modules/npm-debug.log
npm ERR! not ok code 0
请帮忙吗?
注意,我已经安装了libasound2-dev
答案 0 :(得分:1)
对于来自Google的访问者,根据对原始问题的评论,问题与此问题有关:Cannot install packages using node package manager in Ubuntu。
解决方案如下:sudo apt-get install nodejs-legacy