在BeagelBone Black上安装socket.io模块时出现错误

时间:2015-12-01 13:36:23

标签: sockets

我正在尝试在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/"无法在浏览器中打开。

严重受伤!!

2 个答案:

答案 0 :(得分:0)

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

我按照以下2个链接执行相同操作: -

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

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

答案 1 :(得分:0)

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

这让我的BBB适用于套接字相关项目。

此致 阿布舍克巴克。