<div>i have installed cairo and pixman, but cairo cannot find pixman.</div><div><br></div><div><div><font color="#009900">Package pixman-1 was not found in the pkg-config search path.</font></div><div><font color="#009900">Perhaps you should add the directory containing `pixman-1.pc'</font></div>
<div><font color="#009900">to the PKG_CONFIG_PATH environment variable</font></div><div><font color="#009900">No package 'pixman-1' found</font></div><div><font color="#009900">gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1. while trying to load binding.gyp</font></div>
</div><div><br></div><div>my cairo.pc looks like this:</div><div><br></div><div><div><b>prefix=/usr</b></div><div><b>exec_prefix=${prefix}</b></div><div><b>libdir=${exec_prefix}/lib</b></div><div><b>includedir=${prefix}/include</b></div>
<div><b><br></b></div><div><b>Name: cairo</b></div><div><b>Description: Multi-platform 2D graphics library</b></div><div><b>Version: 1.12.14</b></div><div><b><br></b></div><div><b>Requires.private: gobject-2.0 glib-2.0 pixman-1 >= 0.30.0 fontconfig >= 2.2.95 freetype2 >= 9.7.3 libpng xrender >= 0.6 x11</b></div>
<div><b>xext</b></div><div><b>Libs: -L${libdir} -lcairo</b></div><div><b>Libs.private: -lz -lz</b></div><div><b>Cflags: -I${includedir}/cairo</b></div></div><div><br></div><div><br></div><div><br></div><div>with:</div>
<div><br></div><div><b>PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig</b></div><div><br></div><div><br></div><div><br></div><div>following this instruction: <a href="https://npmjs.org/package/canvas">https://npmjs.org/package/canvas</a></div>
<div><br></div><div><br></div><div>[root@vps ~]# npm install canvas</div><div>npm http GET <a href="https://registry.npmjs.org/canvas">https://registry.npmjs.org/canvas</a></div><div>npm http 304 <a href="https://registry.npmjs.org/canvas">https://registry.npmjs.org/canvas</a></div>
<div><br></div><div>> canvas@1.0.3 install /lib/node_modules/canvas</div><div>> node-gyp rebuild</div><div><br></div><div>Package pixman-1 was not found in the pkg-config search path.</div><div>Perhaps you should add the directory containing `pixman-1.pc'</div>
<div>to the PKG_CONFIG_PATH environment variable</div><div>No package 'pixman-1' found</div><div>gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1. while trying to load binding.gyp</div><div>
gyp ERR! configure error </div><div>gyp ERR! stack Error: `gyp` failed with exit code: 1</div><div>gyp ERR! stack at ChildProcess.onCpExit (/root/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:415:16)</div>
<div>gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)</div><div>gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:786:12)</div><div>gyp ERR! System Linux 2.6.32-042stab065.3</div>
<div>gyp ERR! command "node" "/root/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"</div><div>gyp ERR! cwd /lib/node_modules/canvas</div><div>gyp ERR! node -v v0.10.3</div>
<div>gyp ERR! node-gyp -v v0.9.5</div><div>gyp ERR! not ok </div><div>npm ERR! canvas@1.0.3 install: `node-gyp rebuild`</div><div>npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1</div><div>npm ERR! </div>
<div>npm ERR! Failed at the canvas@1.0.3 install script.</div><div>npm ERR! This is most likely a problem with the canvas package,</div><div>npm ERR! not with npm itself.</div><div>npm ERR! Tell the author that this fails on your system:</div>
<div>npm ERR! node-gyp rebuild</div><div>npm ERR! You can get their info via:</div><div>npm ERR! npm owner ls canvas</div><div>npm ERR! There is likely additional logging output above.</div><div><br></div><div>npm ERR! System Linux 2.6.32-042stab065.3</div>
<div>npm ERR! command "node" "/root/local/bin/npm" "install" "canvas"</div><div>npm ERR! cwd /lib</div><div>npm ERR! node -v v0.10.3</div><div>npm ERR! npm -v 1.2.18</div><div>npm ERR! code ELIFECYCLE</div>
<div>npm ERR! </div><div>npm ERR! Additional logging details can be found in:</div><div>npm ERR! /lib/npm-debug.log</div><div>npm ERR! not ok code 0</div><div><br></div><div><br></div><div><br></div><div><br></div><div>
or:</div><div><br></div><div><b>PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig<font color="#cc0000">:/usr/local/lib/pkgconfig</font></b></div><div><br></div><div><br></div><div><br></div><div><div>[root@vps ~]# npm install canvas</div>
<div>npm http GET <a href="https://registry.npmjs.org/canvas">https://registry.npmjs.org/canvas</a></div><div>npm http 304 <a href="https://registry.npmjs.org/canvas">https://registry.npmjs.org/canvas</a></div><div><br></div>
<div>> canvas@1.0.3 install /node_modules/canvas</div><div>> node-gyp rebuild</div><div><br></div><div>make: Entering directory `/node_modules/canvas/build'</div><div> CXX(target) Release/obj.target/canvas/src/Canvas.o</div>
<div>../src/Canvas.cc: In static member function ‘static v8::Handle<v8::Value> Canvas::StreamJPEGSync(const v8::Arguments&)’:</div><div>../src/Canvas.cc:369: warning: passing ‘double’ for argument 2 to ‘void write_to_jpeg_stream(cairo_surface_t*, int, int, closure_t*)’</div>
<div>../src/Canvas.cc:369: warning: passing ‘double’ for argument 3 to ‘void write_to_jpeg_stream(cairo_surface_t*, int, int, closure_t*)’</div><div> CXX(target) Release/obj.target/canvas/src/CanvasGradient.o</div><div> CXX(target) Release/obj.target/canvas/src/CanvasPattern.o</div>
<div> CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o</div><div>../src/CanvasRenderingContext2d.cc: In static member function ‘static v8::Handle<v8::Value> Context2d::DrawImage(const v8::Arguments&)’:</div>
<div>../src/CanvasRenderingContext2d.cc:639: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:640: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:641: warning: converting to ‘int’ from ‘double’</div>
<div>../src/CanvasRenderingContext2d.cc:642: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:643: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:644: warning: converting to ‘int’ from ‘double’</div>
<div>../src/CanvasRenderingContext2d.cc:645: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:646: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:650: warning: converting to ‘int’ from ‘double’</div>
<div>../src/CanvasRenderingContext2d.cc:651: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:652: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:653: warning: converting to ‘int’ from ‘double’</div>
<div>../src/CanvasRenderingContext2d.cc:657: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:658: warning: converting to ‘int’ from ‘double’</div><div>../src/CanvasRenderingContext2d.cc:679: warning: converting to ‘int’ from ‘float’</div>
<div>../src/CanvasRenderingContext2d.cc:680: warning: converting to ‘int’ from ‘float’</div><div>../src/CanvasRenderingContext2d.cc: In static member function ‘static void Context2d::SetShadowBlur(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo&)’:</div>
<div>../src/CanvasRenderingContext2d.cc:942: warning: converting to ‘int’ from ‘double’</div><div> CXX(target) Release/obj.target/canvas/src/color.o</div><div> CXX(target) Release/obj.target/canvas/src/Image.o</div><div>
../src/Image.cc: In member function ‘cairo_status_t Image::loadGIFFromBuffer(uint8_t*, unsigned int)’:</div><div>../src/Image.cc:602: error: ‘cairo_format_stride_for_width’ was not declared in this scope</div><div>../src/Image.cc: In member function ‘cairo_status_t Image::decodeJPEGIntoSurface(jpeg_decompress_struct*)’:</div>
<div>../src/Image.cc:716: error: ‘cairo_format_stride_for_width’ was not declared in this scope</div><div>make: *** [Release/obj.target/canvas/src/Image.o] Error 1</div><div>make: Leaving directory `/node_modules/canvas/build'</div>
<div>gyp ERR! build error </div><div>gyp ERR! stack Error: `make` failed with exit code: 2</div><div>gyp ERR! stack at ChildProcess.onExit (/root/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)</div>
<div>gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)</div><div>gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:786:12)</div><div>gyp ERR! System Linux 2.6.32-042stab065.3</div>
<div>gyp ERR! command "node" "/root/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"</div><div>gyp ERR! cwd /node_modules/canvas</div><div>gyp ERR! node -v v0.10.3</div>
<div>gyp ERR! node-gyp -v v0.9.5</div><div>gyp ERR! not ok </div><div>npm ERR! canvas@1.0.3 install: `node-gyp rebuild`</div><div>npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1</div><div>npm ERR! </div>
<div>npm ERR! Failed at the canvas@1.0.3 install script.</div><div>npm ERR! This is most likely a problem with the canvas package,</div><div>npm ERR! not with npm itself.</div><div>npm ERR! Tell the author that this fails on your system:</div>
<div>npm ERR! node-gyp rebuild</div><div>npm ERR! You can get their info via:</div><div>npm ERR! npm owner ls canvas</div><div>npm ERR! There is likely additional logging output above.</div><div><br></div><div>npm ERR! System Linux 2.6.32-042stab065.3</div>
<div>npm ERR! command "node" "/root/local/bin/npm" "install" "canvas"</div><div>npm ERR! cwd /</div><div>npm ERR! node -v v0.10.3</div><div>npm ERR! npm -v 1.2.18</div><div>npm ERR! code ELIFECYCLE</div>
<div>npm ERR! </div><div>npm ERR! Additional logging details can be found in:</div><div>npm ERR! /npm-debug.log</div><div>npm ERR! not ok code 0</div></div><div><br></div>