错误!在树莓派3型号b上安装节点serialPort

时间:2018-08-03 12:42:57

标签: node.js raspberry-pi raspberry-pi3 iot node-serialport

我正在使用树莓派和arduino.in进行IoT项目,这种情况下我需要同时使用WebSocketSerialPort模块。因为这些模块是与Samsung Artik通信所必需的。但是问题是当我尝试安装serialPort时,它会不断出现以下错误。我在所有的GitHub论坛中找到了解决方案,但它们没有起作用。有人对此有解决方案吗?提前致谢。请参阅错误日志以获取节点版本和其他详细信息。

pi@raspberrypi:~ $ sudo -i

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set                                                                                         a new password.

root@raspberrypi:~# sudo npm install -g --unsafe-perm serialport
(node:1740) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpd                                                                                        ir() instead.
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.j                                                                                        s:167:7)
npm ERR!     at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.14.50-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "--unsafe-perm" "                                                                                        serialport"
npm ERR! cwd /root
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0
root@raspberrypi:~# ^C
root@raspberrypi:~#

错误截图:

Screenshot of error log

raspberry pi 3 B型板具有最新的RASPBIAN OS。

0 个答案:

没有答案
相关问题