kuno/GeoIP — Issue #30: npm install fails from github and 0.4.5
Author: bradcavanagh
Created: 2012-01-25 00:02:12+00:00
State: open

When doing either `npm install -g geoip` or `npm install -g https://github.com/kuno/geoip/tarball/master`, I get the following:

npm http GET https://github.com/kuno/geoip/tarball/master
npm http 200 https://github.com/kuno/geoip/tarball/master

> geoip@0.4.6pre preinstall /home/nodejs/local/lib/node_modules/geoip
> node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /home/nodejs/local
'configure' finished successfully (0.021s)
Waf: Entering directory `/home/nodejs/local/lib/node_modules/geoip/build'
[ 1/11] cxx: src/init.cc -> build/Release/src/init_1.o
[ 2/11] cxx: src/netspeed.cc -> build/Release/src/netspeed_1.o
[ 3/11] cxx: src/country6.cc -> build/Release/src/country6_1.o
[ 4/11] cxx: src/country.cc -> build/Release/src/country_1.o
[ 5/11] cxx: src/region.cc -> build/Release/src/region_1.o
[ 6/11] cxx: src/city6.cc -> build/Release/src/city6_1.o
[ 7/11] cxx: src/city.cc -> build/Release/src/city_1.o
Waf: Leaving directory `/home/nodejs/local/lib/node_modules/geoip/build'
Build failed: -> task failed (err #-1):
{task: cxx region.cc -> region_1.o}
npm ERR! error installing geoip@0.4.6pre

npm ERR! geoip@0.4.6pre preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the geoip@0.4.6pre preinstall script.
npm ERR! This is most likely a problem with the geoip package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls geoip
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.27-openvz-chistyakov.1
npm ERR! command "node" "/home/nodejs/local/bin/npm" "install" "-g" "https://github.com/kuno/geoip/tarball/master"
npm ERR! cwd /home/nodejs

npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! code ELIFECYCLE
npm ERR! message geoip@0.4.6pre preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! message `sh "-c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/nodejs/npm-debug.log
npm not ok

I have installed libgeoip v1.4.8 using `emerge dev-libs/geoip`, and `emerge --search geoip` reflects this:

* dev-libs/geoip
Latest version available: 1.4.8
Latest version installed: 1.4.8
Size of files: 1,789 kB
Homepage: http://www.maxmind.com/geoip/api/c.shtml
Description: easily lookup countries by IP addresses, even when Reverse DNS entries don't exist
License: LGPL-2.1 GPL-2 MaxMind2

I just noticed that the `task failed` line lists a random file each time.