安装node-rdkafka报错,求大神!
发布于 1 天前 作者 shguanbin 163 次浏览 来自 问答

[email protected] install /home/testuser/node_modules/node-rdkafka node-gyp rebuild

gyp WARN EACCES user “root” does not have permission to access the dev dir "/root/.node-gyp/4.5.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/testuser/node_modules/node-r dkafka/.node-gyp" make: Entering directory /home/testuser/node_modules/node-rdkafka/build' CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka.o In file included from ../deps/librdkafka/src/rdposix.h:119, from ../deps/librdkafka/src/rd.h:68, from ../deps/librdkafka/src/rdkafka_int.h:44, from ../deps/librdkafka/src/rdkafka.c:38: ../deps/librdkafka/src/rdatomic.h: In function ‘rd_atomic32_add’: ../deps/librdkafka/src/rdatomic.h:68: warning: implicit declaration of function ‘__atomic_add_fetch ’ ../deps/librdkafka/src/rdatomic.h:68: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this funct ion) ../deps/librdkafka/src/rdatomic.h:68: error: (Each undeclared identifier is reported only once ../deps/librdkafka/src/rdatomic.h:68: error: for each function it appears in.) ../deps/librdkafka/src/rdatomic.h: In function ‘rd_atomic32_sub’: ../deps/librdkafka/src/rdatomic.h:85: warning: implicit declaration of function ‘__atomic_sub_fetch ’ ../deps/librdkafka/src/rdatomic.h:85: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this funct ion) ../deps/librdkafka/src/rdatomic.h: In function ‘rd_atomic32_get’: ../deps/librdkafka/src/rdatomic.h:99: warning: implicit declaration of function ‘__atomic_fetch_add ’ ../deps/librdkafka/src/rdatomic.h:99: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this funct ion) ../deps/librdkafka/src/rdatomic.h: In function ‘rd_atomic64_add’: ../deps/librdkafka/src/rdatomic.h:139: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this func tion) ../deps/librdkafka/src/rdatomic.h: In function ‘rd_atomic64_sub’: ../deps/librdkafka/src/rdatomic.h:156: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this func tion) ../deps/librdkafka/src/rdatomic.h: In function ‘rd_atomic64_get’: ../deps/librdkafka/src/rdatomic.h:170: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this func tion) At top level: cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized" make: *** [Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka.o] Error 1 make: Leaving directory/home/testuser/node_modules/node-rdkafka/build’ gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/testuser/node-v4.5.0-linux-x64/lib/node_modules/np m/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-696.13.2.el6.x86_64 gyp ERR! command “/home/testuser/node-v4.5.0-linux-x64/bin/node” “/home/testuser/node-v4.5.0-linux- x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild" gyp ERR! cwd /home/testuser/node_modules/node-rdkafka gyp ERR! node -v v4.5.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm ERR! Linux 2.6.32-696.13.2.el6.x86_64 npm ERR! argv “/home/testuser/node-v4.5.0-linux-x64/bin/node” “/usr/local/bin/npm” “install” "node- rdkafka" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script ‘node-gyp rebuild’. npm ERR! This is most likely a problem with the node-rdkafka 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 information on how to open an issue for this project with: npm ERR! npm bugs node-rdkafka npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm ERR! npm owner ls node-rdkafka npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/testuser/npm-debug.log

回到顶部