在pkg-config搜索路径中找不到软件包cairo。节点j.s安装画布问题 [英] Package cairo was not found in the pkg-config search path. Node j.s install canvas issue

查看:1622
本文介绍了在pkg-config搜索路径中找不到软件包cairo。节点j.s安装画布问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装节点安装画布模块时遇到问题。似乎是与cairo的东西我得到这个错误...

I am having a problem installing installing the canvas module in node..It seems to be something with cairo I am getting this error...

npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

> canvas@1.1.3 install /Users/plimb/Desktop/motion-therapy/node_modules/canvas
> node-gyp rebuild

Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' 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:424:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/plimb/Desktop/motion-therapy/node_modules/canvas
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1 
npm ERR! not ok code 0

I'm not sure what it all means! Would appreciate any help!For example how to a mkdir cairo pc in the pkg_config_path environment variable? 


推荐答案

有同样的问题, @ Epistemex的< a href =https://github.com/LearnBoost/node-canvas/issues/225>链接帮助我对其进行了疑难解答。

Had the same problem and @Epistemex's link helped me troubleshoot it.

...您需要安装 libcairo2-dev libjpeg-dev libgif-dev 包...



sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev

这篇关于在pkg-config搜索路径中找不到软件包cairo。节点j.s安装画布问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆