2014-12-05 67 views
1

我在Windows 8計算機上安裝Canvas時遇到問題。在Windows 8計算機上安裝Cairo和Canvas

我需要用豬描述符,爲此,我需要安裝帆布但是,當我嘗試「故宮安裝帆布」我得到這個錯誤:

c:\users\omri\node_modules\canvas\src\Canvas.h(19): fatal error C1083: Cannot 
open include file: 'cairo/cairo.h': No such file or directory (..\src\CanvasPatt 

gyp ERR! build error 
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe 
` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ 
npm\node_modules\node-gyp\lib\build.js:267:23) 
gyp ERR! stack  at ChildProcess.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:810: 
12) 
gyp ERR! System Windows_NT 6.2.9200 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu 
les\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\iolo\scipy-0.14.0\node_modules\canvas 
gyp ERR! node -v v0.10.33 
gyp ERR! node-gyp -v v1.0.1 
gyp ERR! not ok 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
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! System Windows_NT 6.2.9200 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod 
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "canvas" 
npm ERR! cwd C:\iolo\scipy-0.14.0 
npm ERR! node -v v0.10.33 
npm ERR! npm -v 1.4.28 
npm ERR! code ELIFECYCLE 
npm ERR! not ok code 0 

我該如何解決這個問題?

+0

您是否安裝了Visual C++ 2010或更新版本? – mscdex 2014-12-05 14:58:54

+0

是的,我確實安裝了它。 @mscdex – 2014-12-05 15:04:08

+0

你安裝了哪個版本? – mscdex 2014-12-05 15:12:40

回答

1

要修復缺失的cairo庫錯誤,請按照說明在canvas模塊的wiki here中安裝cairo。

+0

非常感謝:) – 2014-12-05 17:28:48

0

畫布在某處被硬編碼(或者可能從node-gyp獲取提示)只接受名爲GTK的GTK2目錄。所以它似乎順利提取GTK2到C:\GTK,否則你會追着丟失的頭文件。

相關問題