1

I've installed some packages before with no problems, but with this one, I've tried lot of things with same results.

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

Any help please?

Note, i've got installed libasound2-dev

Juanmito
  • 11
  • 1
  • 3
  • This is advised on the module's readme: `npm install speaker --mpg123-backend=openal`. Have you tried that? – Tom Grant Jun 09 '14 at 12:44
  • Yes, i've tried that, but nothing changes. – Juanmito Jun 09 '14 at 12:45
  • 1
    Due to the 'This failure might be due to the use of legacy binary "node"' message, this might be related: http://stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu – Tom Grant Jun 09 '14 at 12:50
  • The error might be to do with this confusion over the renaming of node in ubuntu. Try this: `sudo apt-get install nodejs-legacy` – Tom Grant Jun 09 '14 at 12:51
  • Tom, you are the best! The problem was in the legacy binary.. :) – Juanmito Jun 09 '14 at 16:32

1 Answers1

1

For visitors from Google, as per the comments to the original question, the problem is related to this issue: Cannot install packages using node package manager in Ubuntu.

The solution was the following: sudo apt-get install nodejs-legacy

Community
  • 1
  • 1
Tom Grant
  • 2,027
  • 18
  • 22