strongloop / strong-pm

deployer for node applications
http://strong-pm.io
Other
1k stars 71 forks source link

Trouble running in CentOS 6.6 due to outdated binary #265

Closed evanhuang8 closed 9 years ago

evanhuang8 commented 9 years ago

I am trying to run strong-pm on a CentOS 6.6 + io.js 2.4.0 machine, and here is the error I am getting while trying to start the daemon process:

Jul 23 08:49:27 MYMACHINE strong-pm:     var homeDir = process.env.HOME;
Jul 23 08:49:27 MYMACHINE strong-pm:   ^
Jul 23 08:49:27 MYMACHINE strong-pm: Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/app/iojs/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/lib/binding/node-v44-linux-x64/node_sqlite3.node)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Error (native)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Module.load (module.js:355:32)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Function.Module._load (module.js:310:12)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Module.require (module.js:365:17)
Jul 23 08:49:27 MYMACHINE strong-pm:     at require (module.js:384:17)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Object.<anonymous> (/opt/app/iojs/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/lib/sqlite3.js:4:15)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Module._compile (module.js:430:26)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Object.Module._extensions..js (module.js:448:10)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Module.load (module.js:355:32)
Jul 23 08:49:27 MYMACHINE strong-pm:     at Function.Module._load (module.js:310:12)
Jul 23 08:49:27 MYMACHINE init: strong-pm main process (21541) terminated with status 1
Jul 23 08:49:27 MYMACHINE init: strong-pm main process ended, respawning

Seems like the libc version is not high enough for one of the dependencies (sqlite), and I don't think I can upgrade glibc to 2.14 on CentOS 6.6.

Seems like this is a recent breaking change as well:

https://github.com/mafintosh/leveldown-prebuilt/issues/1 https://github.com/mapbox/node-sqlite3/issues/484

Do you guys have any tip on how to fix it?

sam-github commented 9 years ago

Its probably possible to convince node-pre-gyp to not try to download and use the prebuilt sqlite3 binding, and just build it. I'll check.

sam-github commented 9 years ago

@bnoordhuis It looks like your patch https://github.com/mapbox/node-sqlite3/pull/444 was accepted, but then re-broken?

rmg commented 9 years ago

According to mapbox/node-sqlite3#244 you can force the addon to be compiled with npm install --build-from-source is how to force compilation. As with other npm CLI flags, this could also be done via an environment variable: npm_config_build_from_source=true.

bnoordhuis commented 9 years ago

@sam-github I suspect the issue lies with the environment the prebuilt sqlite3 module was built in. Building from source should fix that.

evanhuang8 commented 9 years ago

npm install strong-pm --build-from-source worked. Looks like we will just have to wait for upstream to be fixed?

erikverheij commented 9 years ago

I have the same issue on my local windows machine and on an amazon EC2 server (default linux AMI).

On windows "npm install strong-pm --build-from-source" worked, but on the amazon server it doesn't;

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.32"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/.node-gyp"
make: Entering directory `/usr/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/build'
make: *** No rule to make target `../.node-gyp/0.10.32/common.gypi', needed by `Makefile'.  Stop.
make: Leaving directory `/usr/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/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:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.14.44-32.39.amzn1.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/lib/binding/node-v11-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/lib/binding/node-v11-linux-x64"
gyp ERR! cwd /usr/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
bnoordhuis commented 9 years ago

@erikverheij That looks like a permission issue:

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.32"

Which then leads to:

No rule to make target ../.node-gyp/0.10.32/common.gypi', needed byMakefile'.

I speculate that either /root/.node-gyp doesn't exist or has the wrong permissions.

Aside, consider upgrading to the latest v0.10 release, you're a few security patches behind.

erikverheij commented 9 years ago

Thank you. I managed to get it working.

Do you know where that 0.10.32 version is coming from? I tried to update node (to v0.12) and node-gyp.

bnoordhuis commented 9 years ago

I assume it's somewhere on your path. which node should tell you where.