【问题标题】:ERR while installing socket.io module on BeagelBone Black在 BeagelBone Black 上安装 socket.io 模块时出现错误
【发布时间】:2015-12-07 14:58:52
【问题描述】:

我正在尝试在我的 BeagleBone Black 上安装 socket.io 模块。 但我收到以下错误:-

root@beaglebone:~# npm install -g socket.io


> utf-8-validate@1.2.1 install /usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

 WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.40"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/.node-gyp"
Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.8.13-bone70
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing utf-8-validate@1.2.1

> bufferutil@1.2.1 install /usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.40"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/.node-gyp"

我使用的是 BBB 附带的默认操作系统。 我已经更新升级了 BBB。

I execute the following commands:-
1] ntpdate -b -s -u pool.ntp.org
2] npm config set strict-ssl false
3] npm install -g socket.io

请帮我解决这个问题!

问候, 阿布舍克。

补充:- 我尝试卸载并重新安装 nodejs,但在此过程中 Cloud9 也被卸载。现在,即使 nodejs 在安装时也会出错。此外,我的 BBB 通过 ssh 连接,但“https://192.168.7.2/”没有在浏览器中打开。

卡住了!!

【问题讨论】:

标签: sockets


【解决方案1】:

我必须用最新的图像刷新我的 BBB,然后安装 npm。然后我能够正确安装sockets.io并执行相关项目。

我按照以下 2 个链接做同样的事情:-

对于闪烁 BBB:- https://learn.adafruit.com/webide/installation-on-beaglebone

安装 npm:- https://www.npmjs.com/package/bonescript

【讨论】:

  • 这是前两个步骤!!
【解决方案2】:

用于安装 socket.io https://github.com/lgxlogic/BoneScript-SocketIO

这让我的 BBB 为套接字相关项目工作。

问候, 阿布舍克。

【讨论】:

  • 这是最后一步!!
猜你喜欢
  • 1970-01-01
  • 2022-01-25
  • 2018-06-06
  • 2013-07-28
  • 2014-05-07
  • 2014-10-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多