我可以在OpenVZ上运行8的Debian上运行NPM / NodeJS应用程序吗?

我想在我的Debian 8 VPS上运行rocketchat(一个nodejs应用程序)。 这个VPS在OpenVZ上运行,所以内核版本是2.6.32-042stab108.8。 在nodejs网站(他们自己的repo,而不是debian提供的)上描述的安装NodeJS是毫无问题的。

但是,当我运行

npm install 

NPM未能安装所需的软件包并打印以下内容:

 npm WARN package.json meteor-dev-bundle@0.0.0 No description npm WARN package.json meteor-dev-bundle@0.0.0 No repository field. npm WARN package.json meteor-dev-bundle@0.0.0 No README data npm WARN package.json meteor-dev-bundle@0.0.0 No license field. \ > fibers@1.0.5 install /home/rocketchat/rchat/programs/server/node_modules/fibers > node ./build.js (node) child_process: options.customFds option is deprecated. Use options.stdio instead. make: Entering directory '/home/rocketchat/rchat/programs/server/node_modules/fibers/build' CXX(target) Release/obj.target/fibers/src/fibers.o ../src/fibers.cc: In function 'v8::Handle<v8::Signature> uni::NewSignature(v8::Isolate*, v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*)': ../src/fibers.cc:132:54: error: no matching function for call to 'v8::Signature::New(v8::Isolate*&, v8::Handle<v8::FunctionTemplate>&, int&, v8::Handle<v8::FunctionTemplate>*&)' return Signature::New(isolate, receiver, argc, argv); ^ ../src/fibers.cc:132:54: note: candidate is: In file included from /home/rocketchat/.node-gyp/4.4.2/include/node/node.h:42:0, from ../src/coroutine.h:1, from ../src/fibers.cc:1: /home/rocketchat/.node-gyp/4.4.2/include/node/v8.h:4675:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>) static Local<Signature> New( ^ /home/rocketchat/.node-gyp/4.4.2/include/node/v8.h:4675:27: note: candidate expects 2 arguments, 4 provided ../src/fibers.cc: In function 'void uni::SetResourceConstraints(v8::Isolate*, v8::ResourceConstraints*)': ../src/fibers.cc:140:3: error: 'SetResourceConstraints' is not a member of 'v8' v8::SetResourceConstraints(isolate, constraints); ^ ../src/fibers.cc:140:3: note: suggested alternative: ../src/fibers.cc:139:7: note: 'uni::SetResourceConstraints' void SetResourceConstraints(Isolate* isolate, ResourceConstraints* constraints) { ^ ../src/fibers.cc: In function 'v8::Handle<v8::Signature> uni::NewSignature(v8::Isolate*, v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*)': ../src/fibers.cc:133:2: warning: control reaches end of non-void function [-Wreturn-type] } ^ fibers.target.mk:97: recipe for target 'Release/obj.target/fibers/src/fibers.o' failed make: *** [Release/obj.target/fibers/src/fibers.o] Error 1 make: Leaving directory '/home/rocketchat/rchat/programs/server/node_modules/fibers/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:276:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 2.6.32-042stab108.8 gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" gyp ERR! cwd /home/rocketchat/rchat/programs/server/node_modules/fibers gyp ERR! node -v v4.4.2 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok Build failed npm ERR! Linux 2.6.32-042stab108.8 npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--build-from-source" npm ERR! node v4.4.2 npm ERR! npm v2.15.0 npm ERR! code ELIFECYCLE npm ERR! fibers@1.0.5 install: `node ./build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the fibers@1.0.5 install script 'node ./build.js'. npm ERR! This is most likely a problem with the fibers package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./build.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs fibers npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls fibers npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/rocketchat/rchat/programs/server/npm-debug.log 

这是否因为内核太旧而发生? 这似乎很奇怪,特定types的虚拟化使得nodejs无法使用。

编辑:包括完整的npm安装输出

编辑2:编译器版本是gcc-4.9,g ++ – 4.9

我想到了。

首先,不 – OpenVZ所需的内核版本与此无关。

这是发生了什么事。 我尝试安装的nodeJS应用程序(Rocket.Chat)是用Meteor框架构build的。 显然, meteor只能在NodeJS v0.10.40上运行 。 Debian 8存储库只有v4.4.2和v0.10.29,nodejs网站有 v4和v5的说明。

如果遇到此问题,我的build议是通过节点版本pipe理器安装节点v0.10.40。 一旦完成,npm安装将像广告一样工作。