Question

When I install geoip (https://github.com/kuno/GeoIP)

sudo npm install geoip (-g)

I have this error back

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/root/local/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.2.0-24-virtual
gyp ERR! command "node" "/root/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-    gyp.js" "rebuild"
gyp ERR! cwd /var/www/test.com/node_modules/geoip
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

Anyone has the same problem?
This happen remotely on Ubuntu 12.04. In local on OSX it works.

Was it helpful?

Solution

The installation fails as it doesnt find zlip.h file. Please execute this command before executing npm install geoip command

sudo apt-get install zlib1g-dev
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top