node.js - 在 Ubuntu 14.04 上安装 Socket.IO 时出现构建错误

标签 node.js ubuntu redis socket.io

我似乎多次遇到同样的错误。我不断得到这个 (node-gyp rebuild 2> builderror.log) || (导出 0)消息。它到底是什么? node.js redis 模块是否不再包含在 socket.io 中?

ubuntu@ip-10-180-52-29:~$ sudo npm install socket.io

> ws@0.4.31 install /home/ubuntu/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/ubuntu/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/home/ubuntu/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'

> ws@0.4.31 install /home/ubuntu/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/ubuntu/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/home/ubuntu/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
socket.io@1.0.6 node_modules/socket.io
├── debug@0.7.4
├── has-binary-data@0.1.1 (isarray@0.0.1)
├── socket.io-parser@2.2.0 (isarray@0.0.1, emitter@1.0.1, json3@3.2.6)
├── socket.io-adapter@0.2.0 (socket.io-parser@2.1.2)
├── engine.io@1.3.1 (base64id@0.1.0, debug@0.6.0, engine.io-parser@1.0.6, ws@0.4.31)
└── socket.io-client@1.0.6 (to-array@0.1.3, indexof@0.0.1, component-bind@1.0.0, object-component@0.0.3, component-emitter@1.1.2, parseuri@0.0.2, engine.io-client@1.3.1)

最佳答案

我在这里没有看到任何错误。 (node-gyp rebuild 2> builderror.log) || (exit 0) 只是被执行的命令。

  • node-gyp rebuild 是实际命令。
  • 2>:这里的2是stderr,>将stderr重定向到文件builderror.log。简而言之,错误将写入 builderror.log
  • || 表示“或”。如果 (node-gyp rebuild 2> builderror.log) 生成错误,退出代码将为真(不是 0)。如果 node-gyp rebuild 命令没有产生错误,“or”语句的左侧将为 falsy (0),并且 (exit 0)被处决。
  • (exit 0):0为成功状态码。

关于node.js - 在 Ubuntu 14.04 上安装 Socket.IO 时出现构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24564102/

相关文章:

redis - "Disk-backed"复制如何在redis集群中工作

node.js - NodeJS 从缓冲区读取 ASCII

node.js - 'ffmpeg' 在 Hapi js(Node js)中未被识别为内部或外部命令

ubuntu - 无法从 Cassandra 检索数据

c - 搜索文件夹会显示内部和外部的所有内容

ubuntu - 如何使 rtl8192cu 驱动程序在 ubuntu 16.04 上工作?

node.js - 通过 cookie 为 Node.js 集群提供粘性 socket.io session ,无需粘性 Express session

javascript - 完美的 JavaScript 语法在 Eval() 中创建错误

docker - 在Kubernetes中具有持久卷的redisinsights

javascript - 在 python 和 node.js 中复制 java.lang.String.hashCode() 输出的函数