我正在嘗試在我的BeagleBone黑色上安裝socket.io模塊。 但我得到以下錯誤: -在BeagelBone黑色上安裝socket.io模塊時出現ERR錯誤
[email protected]:~# npm install -g socket.io
> [email protected] 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 [email protected]
> [email protected] 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
請幫我解決這個問題!
Regards, Abhishek。
此外: - 我試圖卸載並重新安裝nodejs,但在此過程中,Cloud9也被卸載。現在,即使nodejs在安裝時也出現錯誤。此外,我的BBB通過ssh連接,但「https://192.168.7.2/」未在瀏覽器中打開。
卡住了!
看看[無法從npm安裝任何節點模塊](http://stackoverflow.com/questions/12913141/message-failed-to-fetch-from-registry-while-trying-to-安裝任何模塊)和[NPM - 無法安裝socket.IO](http://stackoverflow.com/questions/16469086/npm-cant-install-socket-io) 可能是這些將解決您的問題。 –
這似乎沒有工作。我會用最新的圖像刷新BBB,然後重試。 – Abhishek