首页 文章

如何为node.js手动安装arpjs模块?

提问于
浏览
0

我正在尝试安装arpjs模块...当我尝试安装它时

npm install arpjs

要么

npm install  
sudo npm install https://github.com/skepticfx/arpjs.git

我总是得到这个错误:

npm WARN生命周期typechecker@2.0.8 ~preinstall:无法在wd%s%s(wd =%s)typechecker@2.0.8节点中运行./cyclic.js /usr/lib/node_modules/.staging/typechecker-8e5299d6dc600530516e3f6be254ad7d socketwatcher@0.2.1 install / usr / lib / node_modules / arpjs / node_modules / socketwatcher node-gyp rebuild make:输入目录/ usr / lib / node_modules / arpjs / node_modules / socketwatcher / build'CXX(target)Release / obj.target /socketwatcher/socket_watcher.o包含在../node_modules/nan/nan_new.h:190:0的文件中,来自../node_modules/nan/nan.h:80,来自../socket_watcher.hpp:8,from ../socket_watcher.cpp:5:../node_modules/nan/nan_implementation_12_inl.h:在静态成员函数'static NanIntern :: FactoryBase <v8 :: Signature> :: return_t NanIntern :: Factory <v8 :: Signature>: :New(NanIntern :: Factory <v8 :: Signature> :: FTH,int,NanIntern :: Factory <v8 :: Signature> :: FTH *)':.. / node_modules / nan / nan_implementation_12_inl.h:181:76 :错误:没有匹配函数调用'v8 :: Signature :: New(v8 :: Isolate *,NanIntern: :Factory <v8 :: Signature> :: FTH&,int&,NanIntern :: Factory <v8 :: Signature> :: FTH *&)'return v8 :: Signature :: New(v8 :: Isolate :: GetCurrent(),接收器,argc,argv); ^ ../node_modules/nan/nan_implementation_12_inl.h:181:76:注意:候选者是:在/home/groshev/.node-gyp/5.0.0/include/node/node.h:42:0中包含的文件中,来自../node_modules/nan/nan.h:24,来自../socket_watcher.hpp:8,来自../socket_watcher.cpp:5:/home/groshev/.node-gyp/5.0.0/include /node/v8.h:4674:27:注意:static v8 :: Local <v8 :: Signature> v8 :: Signature :: New(v8 :: Isolate *,v8 :: Local <v8 :: FunctionTemplate>)static本地<签名>新(^ /home/groshev/.node-gyp/5.0.0/include/node/v8.h:4674:27:注意:候选人需要2个参数,4提供来自../socket_watcher的文件.hpp:8:0,来自../socket_watcher.cpp:5:../node_modules/nan/nan.h:在全球范围内:../ node_modules / nan / nan.h:171:25:错误:重新定义'template <class T> v8 :: Local <T> _NanEnsureLocal(v8 :: Local <T>)'NAN_INLINE v8 :: Local <T> _NanEnsureLocal(v8 :: Local <T> val){^ ../node_modules /nan/nan.h:166:25:错误:'template <class T> v8 :: Local <T> _NanEnsureLocal(v8 :: Handle <T>)'先前在此处声明NAN_INLIN E v8 :: Local <T> _NanEnsureLocal(v8 :: Handle <T> val){^ ../node_modules/nan/nan.h:564:13:错误:'node :: smalloc'尚未声明,节点:: smalloc :: FreeCallback回调^ ../node_modules/nan/nan.h:564:35:错误:在'回调'之前预期','或'...',node :: smalloc :: FreeCallback回调^ . ./node_modules/nan/nan.h:在函数'v8 :: Local <v8 :: Object> NanNewBufferHandle(char *,size_t,int)':.. / node_modules / nan / nan.h:568:50:错误:'callback'未在此范围内声明v8 :: Isolate :: GetCurrent(),data,length,callback,hint); ^ ../node_modules/nan/nan.h:568:60:错误:'hint'未在此范围内声明v8 :: Isolate :: GetCurrent(),data,length,callback,hint); ^ ../node_modules/nan/nan.h:在函数'v8 :: Local <v8 :: Object> NanNewBufferHandle(const char *,uint32_t)':../ node_modules / nan / nan.h:575:67:错误:调用重载'New(v8 :: Isolate *,const char *&,uint32_t&)'是不明确的返回节点:: Buffer :: New(v8 :: Isolate :: GetCurrent(),data,size); ^ ../node_modules/nan/nan.h:575:67:注意:候选人是:来自../node_modules/nan/nan.h:25:0的文件,来自../socket_watcher.hpp:8,来自../socket_watcher.cpp:5:/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:31:40:注意:v8 :: MaybeLocal <v8 :: Object>节点: :Buffer :: New(v8 :: Isolate *,v8 :: Local <v8 :: String>,node :: encoding)<near match> NODE_EXTERN v8 :: MaybeLocal <v8 :: Object> New(v8 :: Isolate * isolate,^ /home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:31:40:注意:参数3从'uint32_t '到'node'没有已知的转换: :encoding'/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:43:40:注意:v8 :: MaybeLocal <v8 :: Object> node :: Buffer :: New(v8 :: Isolate *,char *,size_t)<near match> NODE_EXTERN v8 :: MaybeLocal <v8 :: Object> New(v8 :: Isolate * isolate,^ /home/groshev/.node-gyp/5.0.0/include /node/node_buffer.h:43:40:注意:参数2从'const char '到'char '没有已知的转换在../socket_watcher.hpp:8中包含的文件中:0,来自../socket_watcher.cpp:5:../node_modules/nan/nan.h:在函数'v8 :: Local <v8 :: Object> NanNewBufferHandle(uint32_t)'中:../ node_modules / nan / nan.h:579:61:错误:无法转换'node :: Buffer :: New(v8 :: Isolate :: GetCurrent(),size)'从'v8 :: MaybeLocal <v8 :: Object>'到'v8 :: Local <v8 :: Object>'返回节点:: Buffer :: New(v8 :: Isolate :: GetCurrent(),size); ^ ../node_modules/nan/nan.h:在函数'v8 :: Local <v8 :: Object> NanBufferUse(char ,uint32_t)':.. / node_modules / nan / nan.h:586:12:error :'use'不是'node :: Buffer'返回节点的成员:: Buffer :: Use(v8 :: Isolate :: GetCurrent(),data,size); ^ make: [Release / obj.target / socketwatcher / socket_watcher.o]错误1 make:离开目录/ usr / lib / node_modules / arpjs / node_modules / socketwatcher / build'gyp ERR!构建错误gyp ERR!堆栈错误:退出代码失败:2 gyp ERR!在ChildProcess.onExit堆栈(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)gyp ERR!堆栈在emitTwo(events.js:87:13)gyp ERR!堆栈在ChildProcess.emit(events.js:172:7)gyp ERR! Process.ChildProcess._handle.onexit(internal / child_process.js:200:12)gyp ERR! System Linux 3.16.0-52-generic gyp ERR!命令“/ usr / bin / nodejs”“/ usr / local / lib / node_modules / npm / node_modules / node -gyp / bin / node -gyp.js”“rebuild”gyp ERR! cwd / usr / lib / node_modules / arpjs / node_modules / socketwatcher gyp ERR! node -v v5.0.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR!不行npm WARN安装:socketwatcher@0.2.1 socketwatcher@0.2.1安装:node-gyp rebuild npm WARN安装:socketwatcher@0.2.1退出状态1 / usr /lib└──(空)

npm ERR! code 1

所以我想手动下载sorurce表格github并安装它 . 但是这个模块依赖于其他模块(ip,mac和pcap) . 那我该怎么做呢?

1 回答

  • 0

    此问题已在最新版本的arpjs(1.1.0)中得到修复 . 尝试使用 npm install arpjs 再次安装arpjs

相关问题