0

I am trying to install a printer module for node on a lubuntu system, but making the npm installation, I get this:

gyp: Call to 'cups-config --libs' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.16.0-23-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/puesto1/app/node_modules/printer
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
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! printer@0.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the printer@0.1.1 install script.
npm ERR! This is most likely a problem with the printer 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 printer
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.0-23-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/puesto1/app
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/puesto1/app/npm-debug.log
npm ERR! not ok code 0

It is a recently installed lubuntu, and I don´t know what to do. Any suggestion to solve the problem?? Any other module to print??

Thank you.

Eloy Fernández Franco
  • 1,350
  • 1
  • 24
  • 47
  • 1
    sudo apt-get install nodejs-legacy check this link: http://stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu – Dominic Scanlan Mar 18 '15 at 12:38
  • Thanks @DominicScanlan, but do I need to install on the project where I want to install the printer node, or do I it general (I think that with -g parameter)?? – Eloy Fernández Franco Mar 18 '15 at 12:40
  • Sorry @DominicScanlan I didn´t see "apt-get install"... I was thinking "npm install", but do I need to restart computer?? I didn´t work. – Eloy Fernández Franco Mar 18 '15 at 12:50

1 Answers1

3

I think node-gyp is not up to date in your system and also cups-config is not installed, try to re-install node-gyp using apt-get with this command : sudo apt-get install node-gyp and install cups-config using command : sudo apt-get install libcups2-dev

kabab
  • 169
  • 1
  • 9