npm 安装 PDFkit 失败

发布于 2024-12-08 19:41:57 字数 3935 浏览 0 评论 0原文

我正在尝试使用推荐的命令为 node.js 安装 PDFKit:

npm install pdfkit

但是它失败并显示以下消息:

[电子邮件受保护] 预安装 /home/woody/node_modules/pdfkit /node_modules/zlib 节点 waf 清理 ||真的; node-waf 配置构建

sh: node-waf: not found
sh: node-waf: not found
npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! error installing [email protected]     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected]     at ChildProcess.emit (events.js:67:17)
npm ERR! error installing [email protected]     at ChildProcess.onexit (child_process.js:192:12)
npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! error installing [email protected]     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected]     at ChildProcess.emit (events.js:67:17)
npm ERR! error installing [email protected]     at ChildProcess.onexit (child_process.js:192:12)
npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the zlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls zlib
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 2.6.32-33-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "pdfkit"
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/woody/npm-debug.log
npm not ok

我正在运行 Ubuntu 10.04.3 LTS

如果有人有任何帮助或建议,那就太好了 - 谢谢。

I'm trying to install PDFKit for node.js using the recommended command:

npm install pdfkit

However it fails with the following messages:

[email protected] preinstall /home/woody/node_modules/pdfkit/node_modules/zlib
node-waf clean || true; node-waf configure build

sh: node-waf: not found
sh: node-waf: not found
npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! error installing [email protected]     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected]     at ChildProcess.emit (events.js:67:17)
npm ERR! error installing [email protected]     at ChildProcess.onexit (child_process.js:192:12)
npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! error installing [email protected]     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected]     at ChildProcess.emit (events.js:67:17)
npm ERR! error installing [email protected]     at ChildProcess.onexit (child_process.js:192:12)
npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the zlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls zlib
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 2.6.32-33-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "pdfkit"
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/woody/npm-debug.log
npm not ok

I'm running Ubuntu 10.04.3 LTS

If anyone has any help or suggestions, that'd be great - thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨落成白 2024-12-15 19:41:57

您需要安装nodejs-dev包:

sudo apt-get install nodejs-dev

You need install nodejs-dev package:

sudo apt-get install nodejs-dev
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文