cburgmer / csscritic

Lightweight CSS regression testing
http://cburgmer.github.io/csscritic
486 stars 19 forks source link

fatal error: gif_lib.h: No such file or directory # Ubuntu #70

Closed edouard-lopez closed 9 years ago

edouard-lopez commented 9 years ago

Installing on Linux Mint 17.2 Rafaela gives:

npm install csscritic
npm WARN package.json projetslabo@ No description
npm WARN package.json projetslabo@ No repository field.
npm WARN package.json projetslabo@ No README data
npm WARN package.json projetslabo@ No license field.
npm WARN deprecated jssha@1.5.0: jsSHA versions < v2.0.0 will no longer receive features
/
> canvas@1.1.6 install /home/elopez/projects/ynov-projets-labo/frontend/node_modules/csscritic/node_modules/imagediff/node_modules/canvas
> node-gyp rebuild

make: Entering directory `/home/elopez/projects/ynov-projets-labo/frontend/node_modules/csscritic/node_modules/imagediff/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  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:19: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/elopez/projects/ynov-projets-labo/frontend/node_modules/csscritic/node_modules/imagediff/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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.16.0-38-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/elopez/projects/ynov-projets-labo/frontend/node_modules/csscritic/node_modules/imagediff/node_modules/canvas
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing canvas@1.1.6
edouard-lopez commented 9 years ago

Solved by installing:

sudo apt-get install libgif-dev
krisp1 commented 8 years ago

Had same error when installing canvas@1.3.5. on Ubuntu 14.04. Your solution solved it. thanks.

cburgmer commented 8 years ago

Hey @krisp1, you should not even need to fix this install, as canvas is declared an optional dependency in imagediff (and not needed for the browser). See #73 and #69.