tableflip / guvnor

A node process manager that isn't spanners all the way down
MIT License
430 stars 37 forks source link

Unable to install properly #71

Closed timthomassen closed 8 years ago

timthomassen commented 8 years ago

I've been trying to install guvnor all day now, but I can't seem to install it on my ubuntu server with npm properly. I've tried installing via npm by running sudo npm install -g guvnor --unsafe-perm. It outputs the following and adds a govnur folder to /usr/local/lib/node_modules/ but not to /usr/local/bin/ so neither the guvnor and guv commands work.

Install output:

gw2sk@data:/$ sudo npm install -g guvnor --unsafe-perm

> heapdump@0.3.6 install /usr/local/lib/node_modules/guvnor/node_modules/heapdump
> node-gyp rebuild

make: Entering directory `/usr/local/lib/node_modules/guvnor/node_modules/heapdump/build'
  CXX(target) Release/obj.target/addon/src/heapdump.o
  SOLINK_MODULE(target) Release/obj.target/addon.node
  COPY Release/addon.node
make: Leaving directory `/usr/local/lib/node_modules/guvnor/node_modules/heapdump/build'
npm WARN optional dep failed, continuing fsevents@0.3.6

> usage@0.6.0 install /usr/local/lib/node_modules/guvnor/node_modules/usage
> node-gyp rebuild

make: Entering directory `/usr/local/lib/node_modules/guvnor/node_modules/usage/build'
  CXX(target) Release/obj.target/sysinfo/src/binding.o
  SOLINK_MODULE(target) Release/obj.target/sysinfo.node
  COPY Release/sysinfo.node
make: Leaving directory `/usr/local/lib/node_modules/guvnor/node_modules/usage/build'

> posix@2.0.1 install /usr/local/lib/node_modules/guvnor/node_modules/posix
> node-gyp rebuild

make: Entering directory `/usr/local/lib/node_modules/guvnor/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
  SOLINK_MODULE(target) Release/obj.target/posix.node
  COPY Release/posix.node
make: Leaving directory `/usr/local/lib/node_modules/guvnor/node_modules/posix/build'

> bcrypt@0.8.3 install /usr/local/lib/node_modules/guvnor/node_modules/bcrypt
> node-gyp rebuild

make: Entering directory `/usr/local/lib/node_modules/guvnor/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
  COPY Release/bcrypt_lib.node
make: Leaving directory `/usr/local/lib/node_modules/guvnor/node_modules/bcrypt/build'

> execSync@1.0.2 install /usr/local/lib/node_modules/guvnor/node_modules/execSync
> node install.js

[execsync v1.0.2] Attempting to compile native extensions.
[execSync v1.0.2]
    Native code compile failed!!

> weak@0.4.1 install /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak
> node-gyp rebuild

-
gw2sk@data:/$

I've tried running guv using the path to the bin folder in lib (/usr/local/lib/node_modules/guvnor/bin). When I do this I get an error saying

error: Could not locate the bindings file. Tried:
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/build/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/build/Debug/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/build/Release/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/out/Debug/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/Debug/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/out/Release/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/Release/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/build/default/weakref.node
 → /usr/local/lib/node_modules/guvnor/node_modules/boss-dnode/node_modules/weak/compiled/0.12.7/linux/x64/weakref.node

I've also tried manually installing the previous version (v3.5.11) to see if the problem was also present there, and it was.

I'm running out of ideas and I'd love to hear if anyone knows what's going on.

achingbrain commented 8 years ago

It looks like you're having problems installing native modules. Do you have the build-essential package installed?

Failing that could you paste the full npm-debug.log file here or in a gist?

timthomassen commented 8 years ago

Found the culprit!! After checking the build-essential package and finding out that it was installed I ran the guvnor installation again and checked the logs. I noticed several ENOMEM errors at the end. I checked to see if I had swap memory enabled and I didn't (DOH!) so I assigned a swapfile, ran the guvnor installation again and it managed to install all the way through. Such an easy solution for something that seemed so difficult. I guess I should check the logs more often in cases like this.

Anyway, thanks for the quick help and this cool package. I'm gonna dive in now :)