在 linux 上安装 npm 模块(打印机)时出错
Error installing a npm module (printer) on linux
我正在尝试在 lubuntu 系统上为节点安装 printer module,但是在安装 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
最近装了个lubuntu,不知如何是好。有什么解决问题的建议吗??还有其他要打印的模块吗??
谢谢。
我认为您的系统中的 node-gyp 不是最新的,也没有安装 cups-config,请尝试使用 apt-get 和此命令重新安装 node-gyp:sudo apt -get install node-gyp 并使用命令安装 cups-config:sudo apt-get install libcups2-dev
我正在尝试在 lubuntu 系统上为节点安装 printer module,但是在安装 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
最近装了个lubuntu,不知如何是好。有什么解决问题的建议吗??还有其他要打印的模块吗??
谢谢。
我认为您的系统中的 node-gyp 不是最新的,也没有安装 cups-config,请尝试使用 apt-get 和此命令重新安装 node-gyp:sudo apt -get install node-gyp 并使用命令安装 cups-config:sudo apt-get install libcups2-dev