Node.js 在节点中安装zmq模块时出错

Node.js 在节点中安装zmq模块时出错,node.js,ubuntu,npm,Node.js,Ubuntu,Npm,当我尝试在节点中安装zmq包时,出现以下错误 npm http GET http://registry.npmjs.org.org/zmq npm http 200 http://registry.npmjs.org.org/zmq npm ERR! registry error parsing json > zmq@2.1.0 preinstall /home/sabarish/Desktop/node_modules/zmq > node-waf clean || (exit

当我尝试在节点中安装zmq包时,出现以下错误

npm http GET http://registry.npmjs.org.org/zmq
npm http 200 http://registry.npmjs.org.org/zmq
npm ERR! registry error parsing json

> zmq@2.1.0 preinstall /home/sabarish/Desktop/node_modules/zmq
> node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured)
Setting srcdir to                        : /home/sabarish/Desktop/node_modules/zmq 
Setting blddir to                        : /home/sabarish/Desktop/node_modules/zmq/build 
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr 
Checking for pkg-config version >= 0.0.0 : yes 
Checking for libzmq >= 2.1.0             : yes 
Checking for library uuid                : yes 
'configure' finished successfully (0.090s)
Waf: Entering directory `/home/sabarish/Desktop/node_modules/zmq/build'
[1/2] cxx: binding.cc -> build/Release/binding_1.o
../binding.cc:114:7: error: ‘uv_poll_t’ does not name a type
../binding.cc:115:35: error: ‘uv_poll_t’ has not been declared
../binding.cc:292:27: error: variable or field ‘UV_PollCallback’ declared void
../binding.cc:292:27: error: ‘uv_poll_t’ was not declared in this scope
../binding.cc:292:38: error: ‘handle’ was not declared in this scope
../binding.cc:292:46: error: expected primary-expression before ‘int’
../binding.cc:292:58: error: expected primary-expression before ‘int’
../binding.cc: In constructor ‘zmq::Socket::Socket(zmq::Context*, int)’:
../binding.cc:304:5: error: ‘poll_handle_’ was not declared in this scope
../binding.cc:304:24: error: expected type-specifier before ‘uv_poll_t’
../binding.cc:304:24: error: expected ‘;’ before ‘uv_poll_t’
../binding.cc:308:5: error: ‘uv_os_sock_t’ was not declared in this scope
../binding.cc:308:18: error: expected ‘;’ before ‘socket’
../binding.cc:311:50: error: invalid conversion from ‘int (*)(int, int, int)throw ()’ to ‘void*’ [-fpermissive]
In file included from ../binding.cc:29:0:
/usr/local/include/zmq.h:342:16: error:   initializing argument 3 of ‘int zmq_getsockopt(void*, int, void*, size_t*)’ [-fpermissive]
../binding.cc:312:64: error: ‘uv_poll_init_socket’ was not declared in this scope
../binding.cc:313:33: error: ‘UV_READABLE’ was not declared in this scope
../binding.cc:313:69: error: ‘uv_poll_start’ was not declared in this scope
../binding.cc: In static member function ‘static v8::Handle<v8::Value> zmq::Socket::GetSockOpt(const v8::Arguments&)’:
../binding.cc:395:12: error: ‘ZMQ_HWM’ was not declared in this scope
../binding.cc:401:12: error: ‘ZMQ_SWAP’ was not declared in this scope
../binding.cc:404:12: error: ‘ZMQ_MCAST_LOOP’ was not declared in this scope
../binding.cc: In static member function ‘static v8::Handle<v8::Value> zmq::Socket::SetSockOpt(const v8::Arguments&)’:
../binding.cc:438:12: error: ‘ZMQ_HWM’ was not declared in this scope
../binding.cc:443:12: error: ‘ZMQ_SWAP’ was not declared in this scope
../binding.cc:446:12: error: ‘ZMQ_MCAST_LOOP’ was not declared in this scope
../binding.cc: In static member function ‘static v8::Handle<v8::Value> zmq::Socket::Recv(const v8::Arguments&)’:
../binding.cc:661:45: error: too few arguments to function ‘int zmq_recv(void*, void*, size_t, int)’
In file included from ../binding.cc:29:0:
/usr/local/include/zmq.h:349:16: note: declared here
../binding.cc: In static member function ‘static v8::Handle<v8::Value> zmq::Socket::Send(const v8::Arguments&)’:
../binding.cc:774:46: error: too few arguments to function ‘int zmq_send(void*, const void*, size_t, int)’
In file included from ../binding.cc:29:0:
/usr/local/include/zmq.h:348:16: note: declared here
../binding.cc: In member function ‘void zmq::Socket::Close()’:
../binding.cc:792:20: error: ‘poll_handle_’ was not declared in this scope
../binding.cc:792:32: error: ‘uv_poll_stop’ was not declared in this scope
../binding.cc: In function ‘void zmq::Initialize(v8::Handle<v8::Object>)’:
../binding.cc:844:5: error: ‘ZMQ_HWM’ was not declared in this scope
../binding.cc:845:5: error: ‘ZMQ_SWAP’ was not declared in this scope
../binding.cc:852:5: error: ‘ZMQ_MCAST_LOOP’ was not declared in this scope
Waf: Leaving directory `/home/sabarish/Desktop/node_modules/zmq/build'
Build failed:  -> task failed (err #1): 
    {task: cxx binding.cc -> binding_1.o}
npm ERR! error installing zmq@2.1.0
npm WARN This failure might be due to the use of legacy binary "node" 
npm WARN For further explanations, please read
npm WARN /usr/share/doc/nodejs/README.Debian
npm WARN 

npm ERR! zmq@2.1.0 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR! 
npm ERR! Failed at the zmq@2.1.0 preinstall script.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 3.8.0-35-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "zmq"
npm ERR! cwd /home/sabarish/Desktop/zeromq-3.2.1
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message zmq@2.1.0 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! message `sh "-c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/sabarish/Desktop/zeromq-3.2.1/npm-debug.log
npm not ok
npmhttpgethttp://registry.npmjs.org.org/zmq
npm http 200http://registry.npmjs.org.org/zmq
npm错误!解析json时发生注册表错误
> zmq@2.1.0预安装/home/sabarish/Desktop/node_模块/zmq
>节点waf clean | |(退出0);节点waf配置生成
无需清理(项目未配置)
将srcdir设置为:/home/sabarish/Desktop/node\u modules/zmq
将blddir设置为:/home/sabarish/Desktop/node\u modules/zmq/build
检查程序g++或C++:/rr/bin /g++
检查程序cpp:/usr/bin/cpp
检查程序ar:/usr/bin/ar
正在检查程序ranlib:/usr/bin/ranlib
检查g++:ok
正在检查节点路径:未找到
检查节点前缀:ok/usr
正在检查pkg配置版本>=0.0.0:是
正在检查libzmq>=2.1.0:是
正在检查库uuid:是
“配置”已成功完成(0.090s)
Waf:进入目录“/home/sabarish/Desktop/node\u modules/zmq/build”
[1/2]cxx:binding.cc->build/Release/binding_1.o
../binding.cc:114:7:错误:“uv\u poll\t”未命名类型
../binding.cc:115:35:错误:“uv\u poll\t”尚未声明
../binding.cc:292:27:错误:变量或字段“UV_PollCallback”声明为无效
../binding.cc:292:27:错误:“uv\u poll\t”未在此范围内声明
../binding.cc:292:38:错误:未在此作用域中声明“句柄”
../binding.cc:292:46:错误:应在“int”之前使用主表达式
../binding.cc:292:58:错误:应在“int”之前使用主表达式
../binding.cc:在构造函数“zmq::Socket::Socket(zmq::Context*,int)”中:
../binding.cc:304:5:错误:“poll\u handle\u”未在此作用域中声明
../binding.cc:304:24:错误:“uv\u poll\t”之前应为类型说明符
../binding.cc:304:24:错误:应为“;”在“uv投票”之前
../binding.cc:308:5:错误:“uv\u os\u sock\t”未在此作用域中声明
../binding.cc:308:18:错误:应为“;”在“插座”之前
../binding.cc:311:50:错误:从“int(*)(int,int,int)throw()”到“void*”[-fpermissive]的转换无效
在../binding.cc:29:0中包含的文件中:
/usr/local/include/zmq.h:342:16:错误:初始化“int-zmq_getsockopt(void*,int,void*,size_t*)”的参数3[-fppermissive]
../binding.cc:312:64:错误:“uv\u poll\u init\u socket”未在此作用域中声明
../binding.cc:313:33:错误:“UV_READABLE”未在此作用域中声明
../binding.cc:313:69:错误:“uv\u poll\u start”未在此范围内声明
../binding.cc:在静态成员函数“static v8::Handle zmq::Socket::GetSockOpt(const v8::Arguments&)”中:
../binding.cc:395:12:错误:“ZMQ_HWM”未在此作用域中声明
../binding.cc:401:12:错误:“ZMQ_SWAP”未在此作用域中声明
../binding.cc:404:12:错误:“ZMQ\u MCAST\u循环”未在此作用域中声明
../binding.cc:在静态成员函数“static v8::Handle zmq::Socket::SetSockOpt(const v8::Arguments&)”中:
../binding.cc:438:12:错误:“ZMQ_HWM”未在此作用域中声明
../binding.cc:443:12:错误:“ZMQ_SWAP”未在此作用域中声明
../binding.cc:446:12:错误:“ZMQ_MCAST_LOOP”未在此作用域中声明
../binding.cc:在静态成员函数“static v8::Handle zmq::Socket::Recv(const v8::Arguments&)”中:
../binding.cc:661:45:错误:函数“int zmq_recv(void*,void*,size_t,int)”的参数太少
在../binding.cc:29:0中包含的文件中:
/usr/local/include/zmq.h:349:16:注:此处声明
../binding.cc:在静态成员函数“static v8::Handle zmq::Socket::Send(const v8::Arguments&)”中:
../binding.cc:774:46:错误:函数“int-zmq\u-send(void*,const-void*,size\u t,int)”的参数太少
在../binding.cc:29:0中包含的文件中:
/usr/local/include/zmq.h:348:16:注:此处声明
../binding.cc:在成员函数“void zmq::Socket::Close()”中:
../binding.cc:792:20:错误:“poll\u handle\u”未在此作用域中声明
../binding.cc:792:32:错误:“uv\u poll\u stop”未在此作用域中声明
../binding.cc:在函数“void zmq::Initialize(v8::Handle)”中:
../binding.cc:844:5:错误:“ZMQ_HWM”未在此作用域中声明
../binding.cc:845:5:错误:“ZMQ_SWAP”未在此作用域中声明
../binding.cc:852:5:错误:“ZMQ_MCAST_LOOP”未在此作用域中声明
Waf:离开目录“/home/sabarish/Desktop/node\u modules/zmq/build”
生成失败:->任务失败(错误1):
{task:cxx binding.cc->binding_1.o}
npm错误!安装错误zmq@2.1.0
npm警告此故障可能是由于使用了旧的二进制“节点”
npm警告如需进一步解释,请阅读
npm WARN/usr/share/doc/nodejs/README.Debian
npm警告
npm错误!zmq@2.1.0预安装:`node waf clean | |(退出0);节点waf配置生成`
npm错误`sh“-c”节点waf清理| |(退出0);节点waf配置生成“`失败,错误为1
npm错误!
npm错误!失败zmq@2.1.0预安装脚本。
npm错误!这很可能是zmq软件包的问题,
npm错误!与npm本身无关。
npm错误!告诉作者此操作在您的系统上失败:
npm错误!节点waf clean | |(退出0);节点waf配置生成
npm错误!您可以通过以下方式获取他们的信息:
npm错误!npm所有者ls zmq
npm错误!上面可能还有其他日志输出。
npm错误!
npm错误!Linux系统3.8.0-35-generic
npm错误!命令“/usr/bin/nodejs”“/usr/bin/npm”“安装”“zmq”
npm错误!cwd/home/sabarish/Desktop/zeromq-3.2.1
npm错误!节点-v v0.6.19
npm错误!npm-V1.1.4
npm错误!代码失效循环
npm错误!消息zmq@2.1.0预安装:`node waf clean | |(退出0);节点waf配置生成`
npm错误!消息'sh“-c”“节点waf clean | |(退出0);节点waf配置生成“`失败,错误为1
npm错误!errno{}
npm错误!
N