pinittome / pinitto.me

Main repo for pinitto.me open source corkboard
https://pinitto.me
Apache License 2.0
64 stars 14 forks source link

npm i . fails on gif_lib.h: No such file or directory #110

Closed arthurlutz closed 10 years ago

arthurlutz commented 10 years ago

sorry, am not familiar with npm, how do I fix this ?

 npm i .
npm WARN package.json connect-mongo@0.2.0 No repository field.
npm WARN package.json recaptcha@1.2.0 No repository field.
npm http GET https://registry.npmjs.org/captcha/0.0.4
npm http 304 https://registry.npmjs.org/captcha/0.0.4
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 /home/arthur/local/pinitto.me/node_modules/captcha/node_modules/canvas
> node-gyp rebuild

make: Entering directory `/home/arthur/local/pinitto.me/node_modules/captcha/node_modules/canvas/build'
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
In file included from ../src/CanvasPattern.cc:9:0:
../src/Image.h:20:21: fatal error: gif_lib.h: No such file or directory
 #include <gif_lib.h>
                     ^
compilation terminated.
make: *** [Release/obj.target/canvas/src/CanvasPattern.o] Error 1
make: Leaving directory `/home/arthur/local/pinitto.me/node_modules/captcha/node_modules/canvas/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
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 Linux 3.11.0-20-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/arthur/local/pinitto.me/node_modules/captcha/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
peterwilli commented 10 years ago

Hi @arthurlutz I never tried compiling on Linux, but I think you need libgif-dev on Ubuntu (I dont know how the package is called on other distributions) let me know if that worked, if not, Which linux distribution are you on?

lloydwatkin commented 10 years ago

@arthurlutz this will be the captcha module causing you problems as it needs libcairo. Please check out their comprehensive installation instructions here: https://github.com/LearnBoost/node-canvas/wiki/_pages

What version of pinittome are you trying to run? Please note that master is currently unstable/in development so if you want a fully functional version please choose the latest tagged release.

philcryer commented 10 years ago

Verfied - in Ubuntu 14.04 LTS to successfully complete npm install, Ubuntu (Debian) users need libgif-dev:

apt-get install libgif-dev
lloydwatkin commented 10 years ago

Great!