[root@localhost node]# node -v v4.1.0 [root@localhost node]# npm -v 2.14.3 [root@localhost node]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /usr/local/src/gcc-4.9.2/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib Thread model: posix gcc version 4.9.2 (GCC) [root@localhost node]# g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /usr/local/src/gcc-4.9.2/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib Thread model: posix gcc version 4.9.2 (GCC) [root@localhost node]# python -V Python 2.7.10
基本上把可能出现问题的组件都升级了 还是出现错误 出现错误如下 求帮忙,谢谢!
[root@localhost node]# npm install ccap
ccap@0.6.0 preinstall /root/node/node_modules/ccap node make.js
I’m glad you to select ccap, enjoy it!
ccap is a cross plat form and portable nodejs simple captcha module, simple api and lightweight.
starting compile ccap! good luck! \
ccap@0.6.0 install /root/node/node_modules/ccap node-gyp rebuild
make: Entering directory /root/node/node_modules/ccap/build' CC(target) Release/obj.target/hcaptha/addon/jpeglib/jaricom.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcapimin.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcapistd.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcarith.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jccoefct.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jccolor.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcdctmgr.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jchuff.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcinit.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcmainct.o ../addon/jpeglib/jcmainct.c: In function ‘start_pass_main’: ../addon/jpeglib/jcmainct.c:71: warning: ‘main’ is usually a function ../addon/jpeglib/jcmainct.c: In function ‘process_data_simple_main’: ../addon/jpeglib/jcmainct.c:117: warning: ‘main’ is usually a function ../addon/jpeglib/jcmainct.c: In function ‘jinit_c_main_controller’: ../addon/jpeglib/jcmainct.c:247: warning: ‘main’ is usually a function CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcmarker.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcmaster.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcomapi.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcparam.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcprepct.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jcsample.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jctrans.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdapimin.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdapistd.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdarith.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdatadst.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdatasrc.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdcoefct.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdcolor.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jddctmgr.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdhuff.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdinput.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdmainct.o ../addon/jpeglib/jdmainct.c: In function ‘alloc_funny_pointers’: ../addon/jpeglib/jdmainct.c:162: warning: ‘main’ is usually a function ../addon/jpeglib/jdmainct.c: In function ‘make_funny_pointers’: ../addon/jpeglib/jdmainct.c:203: warning: ‘main’ is usually a function ../addon/jpeglib/jdmainct.c: In function ‘set_wraparound_pointers’: ../addon/jpeglib/jdmainct.c:243: warning: ‘main’ is usually a function ../addon/jpeglib/jdmainct.c: In function ‘set_bottom_pointers’: ../addon/jpeglib/jdmainct.c:272: warning: ‘main’ is usually a function ../addon/jpeglib/jdmainct.c: In function ‘start_pass_main’: ../addon/jpeglib/jdmainct.c:309: warning: ‘main’ is usually a function ../addon/jpeglib/jdmainct.c: In function ‘process_data_simple_main’: ../addon/jpeglib/jdmainct.c:349: warning: ‘main’ is usually a function ../addon/jpeglib/jdmainct.c: In function ‘process_data_context_main’: ../addon/jpeglib/jdmainct.c:389: warning: ‘main’ is usually a function ../addon/jpeglib/jdmainct.c: In function ‘jinit_d_main_controller’: ../addon/jpeglib/jdmainct.c:478: warning: ‘main’ is usually a function CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdmarker.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdmaster.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdmerge.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdpostct.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdsample.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jdtrans.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jerror.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jfdctflt.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jfdctfst.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jfdctint.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jidctflt.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jidctfst.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jidctint.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jquant1.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jquant2.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jutils.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jmemmgr.o CC(target) Release/obj.target/hcaptha/addon/jpeglib/jmemnobs.o CXX(target) Release/obj.target/hcaptha/addon/hcaptha.o In file included from /usr/local/include/c++/4.9.2/bits/move.h:57:0, from /usr/local/include/c++/4.9.2/bits/stl_pair.h:59, from /usr/local/include/c++/4.9.2/bits/stl_algobase.h:64, from /usr/local/include/c++/4.9.2/bits/char_traits.h:39, from /usr/local/include/c++/4.9.2/string:40, from ../addon/cap.h:4, from ../addon/hcaptha.cc:2: /usr/local/include/c++/4.9.2/type_traits:247:41: error: template argument 1 is invalid struct __is_integral_helper<__int128> ^ /usr/local/include/c++/4.9.2/type_traits:251:50: error: template argument 1 is invalid struct __is_integral_helper<unsigned __int128> ^ /usr/local/include/c++/4.9.2/type_traits:1623:36: error: template argument 1 is invalid struct __make_unsigned<__int128> ^ /usr/local/include/c++/4.9.2/type_traits:1720:43: error: template argument 1 is invalid struct __make_signed<unsigned __int128> ^ In file included from /usr/local/include/c++/4.9.2/ext/string_conversions.h:41:0, from /usr/local/include/c++/4.9.2/bits/basic_string.h:2850, from /usr/local/include/c++/4.9.2/string:52, from ../addon/cap.h:4, from ../addon/hcaptha.cc:2: /usr/local/include/c++/4.9.2/cstdlib:178:10: error: expected unqualified-id before ‘__int128’ inline __int128 ^ make: *** [Release/obj.target/hcaptha/addon/hcaptha.o] Error 1 make: Leaving directory
/root/node/node_modules/ccap/build’
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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-431.el6.x86_64
gyp ERR! command “/nodejs/bin/node” “/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /root/node/node_modules/ccap
gyp ERR! node -v v4.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 2.6.32-431.el6.x86_64
npm ERR! argv “/nodejs/bin/node” “/usr/local/bin/npm” “install” "ccap"
npm ERR! node v4.1.0
npm ERR! npm v2.14.3
npm ERR! code ELIFECYCLE
npm ERR! ccap@0.6.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ccap@0.6.0 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the ccap 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 ccap
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /root/node/npm-debug.log
node-gyp -v ?
@pisceswin 这个是command not found 欸。。。
@pisceswin [root@localhost node]# node-gyp -v v3.0.3
建议试试低版本的 0.12.6 7 的查看是否可用!
@wsqandgy node 的版本还是 ccap的版本?ccap没这个版本欸。node公司要求都用最新的。。。
我记得当时是换成python2.7.3就好了
@mikan2000 一定要这个版本吗。?我2.7.5和2.7.10都试过。。那我降下来试试看吧。谢谢
解决了,当我吧node 版本换成64位的就解决了,真是醉了啊。。。这个也有影响,据说32位是没有int128