gpt4 book ai didi

linux - 在 Linux 上安装 npm 模块(打印机)时出错

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:09:51 26 4
gpt4 key购买 nike

我正在尝试安装 printer module对于 lubuntu 系统上的 Node ,但是在安装 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

关于linux - 在 Linux 上安装 npm 模块(打印机)时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29122151/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com