简体   繁体   English

在Linux上安装NPM模块(打印机)时出错

[英]Error installing a npm module (printer) on linux

I am trying to install a printer module for node on a lubuntu system, but making the npm installation, I get this: 我试图在lubuntu系统上为节点安装打印机模块 ,但是进行npm安装,我得到以下信息:

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. 这是最近安装的lubuntu,我不知道该怎么办。 Any suggestion to solve the problem?? 有什么解决问题的建议吗? Any other module to print?? 还有其他要打印的模块吗?

Thank you. 谢谢。

我认为node-gyp在您的系统中不是最新的,并且也未安装cups-config,请尝试使用apt-get并通过以下命令重新安装node- gyp: sudo apt-get install node- gyp和install cups-使用命令配置: sudo apt-get install libcups2-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM