TooTallNate/node-time

install failed on (Ubuntu/Linaro 4.6.3-1ubuntu4)

Closed this issue · 2 comments

Hi all,
I run the 'sudo npm install time' and return following error message, any idea and suggestion? thanks in advance!

B.R
Nick Lee

$ uname -a
Linux hotspot-dev-box 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux
$ node --version
v0.11.11
$ npm --version
1.3.25

LOG:

npm http GET https://registry.npmjs.org/time
npm http 304 https://registry.npmjs.org/time
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/debug

> time@0.10.0 install /home/vagrant/workspace/countly-server/api/node_modules/time
> node-gyp rebuild

make: Entering directory `/home/vagrant/workspace/countly-server/api/node_modules/time/build'
  CXX(target) Release/obj.target/time/src/time.o
In file included from /usr/include/i386-linux-gnu/sys/socket.h:40:0,
                 from /home/vagrant/.node-gyp/0.11.11/deps/uv/include/uv-unix.h:29,
                 from /home/vagrant/.node-gyp/0.11.11/deps/uv/include/uv.h:60,
                 from /home/vagrant/workspace/countly-server/api/node_modules/time/node_modules/nan/nan.h:9
6,
                 from ../src/time.cc:7:
/usr/include/i386-linux-gnu/bits/socket.h:352:3: error: 'uid_t' does not name a type
/usr/include/i386-linux-gnu/bits/socket.h:353:3: error: 'gid_t' does not name a type
In file included from /home/vagrant/.node-gyp/0.11.11/deps/uv/include/uv-unix.h:31:0,
                 from /home/vagrant/.node-gyp/0.11.11/deps/uv/include/uv.h:60,
                 from /home/vagrant/workspace/countly-server/api/node_modules/time/node_modules/nan/nan.h:9
6,
                 from ../src/time.cc:7:
/usr/include/netinet/tcp.h:94:5: error: 'u_int16_t' does not name a type
/usr/include/netinet/tcp.h:95:5: error: 'u_int16_t' does not name a type
/usr/include/netinet/tcp.h:96:5: error: 'u_int32_t' does not name a type
/usr/include/netinet/tcp.h:97:5: error: 'u_int32_t' does not name a type
/usr/include/netinet/tcp.h:99:5: error: 'u_int16_t' does not name a type
/usr/include/netinet/tcp.h:100:5: error: 'u_int16_t' does not name a type

.
.
.

vagrant@hotspot-dev-box:~/workspace/countly-server/api$
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:107:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:879:12)
gyp ERR! System Linux 3.2.0-23-generic-pae
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/workspace/countly-server/api/node_modules/time
gyp ERR! node -v v0.11.11
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! time@0.9.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the time@0.9.2 install script.
npm ERR! This is most likely a problem with the time package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls time
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-23-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "time@0.9.2"
npm ERR! cwd /home/vagrant/workspace/countly-server/api
npm ERR! node -v v0.11.11
npm ERR! npm -v 1.3.25
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/vagrant/workspace/countly-server/api/npm-debug.log
npm ERR! not ok code 0
vagrant@hotspot-dev-box:~/workspace/countly-server/api$
vagrant@hotspot-dev-box:~/workspace/countly-server/api$ node --version
v0.11.11
vagrant@hotspot-dev-box:~/workspace/countly-server/api$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I solved this problem by re-install the nodejs 0.10.26, seems the 0.11.11 is not compatible with the time now.

v0.11.x should work now.