无法在Ubuntu上安装ZeroRPC

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法在Ubuntu上安装ZeroRPC相关的知识,希望对你有一定的参考价值。

我一直在尝试在Ubuntu上安装ZeroRPC。我已经安装了ZeroMQ,但在安装ZeroRPC时出现了这些错误。我基本上想从node.js在后台运行一个python脚本,它发送JSON对象并从python代码接收JSON。此外,python代码必须始终在后端运行。

gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
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 4.4.0-21-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/user/node_modules/msgpack
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

/home/user
`-- python-shell@0.4.0 

npm WARN enoent ENOENT: no such file or directory, open '/home/user/package.json'
npm WARN user No description
npm WARN user No repository field.
npm WARN user No README data
npm WARN user No license field.
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "zerorpc"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! msgpack@1.0.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the msgpack@1.0.2 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs msgpack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls msgpack
npm ERR! There is likely additional logging output above.

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

npm ERR!     npm bugs msgpack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls msgpack
npm ERR! There is likely additional logging output above.

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

没有安装它并坚持下去。

答案

错误是关于无法构建msgpack,而不是关于zerorpc。请尝试按照错误消息告诉您的操作。这将帮助您成功构建msgpack。

另一答案

我刚刚经历过同样的问题。

我找到了另一个答案(node-gyp rebuild error while installing node modules)帮助我成功构建了我的项目。

清除包管理器缓存

sudo npm cache clean -f

安装节点版本管理器

sudo npm install -g n

更新到v4.3.0(尚未调查此版本的重要性,但它解决了我的问题看起来与上面的相同)

sudo n 4.3.0

安装你的图书馆

sudo npm install zerorpc

以上是关于无法在Ubuntu上安装ZeroRPC的主要内容,如果未能解决你的问题,请参考以下文章

续:纠正:ubuntu7.04可以安装,而且完美的安装 ! for《Oracle-10.2.0.1,打补丁10.2.0.5:在 debian 版本4不含4以上,及 ubuntu 7.04不含(代码片段

无法在ubuntu 18.04.01上安装gcc

找出zerorpc服务器的绑定端口

es6 对象的 getter、setter 和函数不适用于远程过程调用 (zerorpc)

ubuntu 为啥无法安装在移动硬盘上了

无法在 ubuntu 上安装 freeipa-server