无法安装msgpack,节点server.js会抛出错误

时间:2014-05-11 01:17:47

标签: javascript node.js

安装msgpack时遇到问题,而node server.js会抛出错误 - 认为它们可能是相关的。对于尝试安装我得到:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 2.6.32-042stab085.17
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/msgpack
gyp ERR! node -v v0.10.27
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm ERR! msgpack@0.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the msgpack@0.2.3 install script.
npm ERR! This is most likely a problem with the msgpack 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 msgpack
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-042stab085.17
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "-g" "install" "msgpack"
npm ERR! cwd /var/www/html/nlp-project/nlp/nodeServer
npm ERR! node -v v0.10.27
npm ERR! npm -v 1.4.8
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/html/nlp-project/nlp/nodeServer/npm-debug.log
npm ERR! not ok code 0

和节点server.js我得

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: /var/www/html/nlp-project/nlp/nodeServer/node_modules/zerorpc/node_modules/msgpack/build/Release/msgpackBinding.node: undefined symbol: __sync_sub_and_fetch_4
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/www/html/nlp-project/nlp/nodeServer/node_modules/zerorpc/node_modules/msgpack/lib/msgpack.js:6:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/www/html/nlp-project/nlp/nodeServer/node_modules/zerorpc/lib/events.js:24:15)

我已经探索了yum install gcc44 libstdc ++ 44-devel gcc44-c ++

所以你可以使用gcc44作为编译器: gcc版本4.4.7 20120313(Red Hat 4.4.7-1)(GCC)

我也安装了开发工具。

看到这些: http://ask.xmodulo.com/upgrade-gcc-centos.html https://www.centos.org/forums/viewtopic.php?t=18541

有关获取节点服务器的任何想法吗?

0 个答案:

没有答案