在pkg-config搜索路径中找不到软件包cairoNode JS安装画布问题

【字号: 日期:2024-04-15浏览:26作者:雯心
(adsbygoogle = window.adsbygoogle || []).push({}); 如何解决在pkg-config搜索路径中找不到软件包cairoNode JS安装画布问题?

同样的问题,

…您需要安装libcairo2-dev,libjpeg-dev并libgif-dev包…

sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev解决方法

我在节点上安装canvas模块时遇到问题..似乎与开罗有关,我收到此错误…

npm http GET https://registry.npmjs.org/canvasnpm http 304 https://registry.npmjs.org/canvasnpm http GET https://registry.npmjs.org/nannpm http 304 https://registry.npmjs.org/nan> canvas@1.1.3 install /Users/plimb/Desktop/motion-therapy/node_modules/canvas> node-gyp rebuildPackage 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 variableNo package ’cairo’ foundgyp: Call to ’./util/has_cairo_freetype.sh’ returned exit status 0. while trying to load binding.gypgyp ERR! configure errorgyp ERR! stack Error: `gyp` failed with exit code: 1gyp 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.0gyp 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/canvasgyp ERR! node -v v0.10.21gyp ERR! node-gyp -v v0.10.10gyp ERR! not oknpm ERR! weird error 1 npm ERR! not ok code 0

我不确定这意味着什么!希望对您有所帮助!例如,如何在pkg_config_path环境变量中安装mkdir cairo pc?

相关文章: