node.js - 在 FreeBSD 10.1 上 npm 安装 Canvas

标签 node.js npm freebsd

谁能告诉我这是怎么回事吗? cairo-1.12.18_1,2 已安装。我已尝试 export PKG_CONFIG_PATH=/usr/local/libdata/pkgconfig 无济于事:

# uname -a
FreeBSD test 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014
# npm install canvas
/
> canvas@1.1.6 install /usr/home/www/myapp/node_modules/canvas
> node-gyp rebuild

./util/has_cairo_freetype.sh: line 4: pkg-config: command not found
gyp: Call to './util/has_cairo_freetype.sh' returned exit status 0. 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/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System FreeBSD 10.1-RELEASE
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/www/myapp/node_modules/canvas
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! FreeBSD 10.1-RELEASE
npm ERR! argv "node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.18
npm ERR! code ELIFECYCLE

npm ERR! canvas@1.1.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@1.1.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the canvas 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 canvas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/home/www/myapp/npm-debug.log

最佳答案

安装pkgconf软件包。 (将我的评论移至答案,以便您可以将其标记为正确,以造福 future 的观看者。)

关于node.js - 在 FreeBSD 10.1 上 npm 安装 Canvas ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28013815/

相关文章:

javascript - React Native 上的 gRPC

node.js - 使用Application Insights : TypeError: Cannot read property 'stack' of undefined跟踪自定义错误的问题

performance - 文件系统通过大量小文件寻求性能

FreeBSD 中的 Linux 程序

node.js - 如何在 package.json 中指定所需的 Node.js 版本?

shell - FreeBSD pkg_create 如何

javascript - Nodejs 基础知识 : How and where I can use require(module)?

javascript - 基于 CLI 的 Node 聊天应用程序

npm - webpack/babel/es6导入问题-(0,_whatwgFetch2.default)不是函数

node.js - npm:如何在每次更改时运行测试和 lint?