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



我正试图在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/"不会在浏览器中打开。

卡住了!!

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

我遵循以下2个链接做同样的事情:-

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

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

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

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

谨致问候,阿布谢克。

最新更新