首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在raspberrypi v4.0上安装"bluetooth-hci-socket“?

在raspberrypi v4.0上安装"bluetooth-hci-socket“?
EN

Stack Overflow用户
提问于 2020-11-28 17:05:05
回答 1查看 881关注 0票数 0

正在尝试将BLE设备与Raspberry PI上的nodejs连接。它需要bluetooth-hci-socket模块作为noble模块的依赖项。这是我的错误日志。

代码语言:javascript
运行
复制
pi@raspberrypi:~/bluetooth $ npm install bluetooth-hci-socket
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/bluetooth-hci-socket failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

> usb@1.6.3 install /home/pi/bluetooth/node_modules/usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /home/pi/.npm/_prebuilds/e00ec3-usb-v1.6.3-node-v64-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v64-linux-arm.tar.gz
prebuild-install WARN install getaddrinfo EAI_AGAIN github.com github.com:443
/home/pi/.config/nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: 5: /home/pi/.config/nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js: not found

> bluetooth-hci-socket@0.5.1 install /home/pi/bluetooth/node_modules/bluetooth-hci-socket
> node-gyp rebuild

/home/pi/.config/nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: 5: /home/pi/.config/nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js: not found
npm WARN y@1.0.0 No description
npm WARN y@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.3 (node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.3 install: `prebuild-install --verbose || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! bluetooth-hci-socket@0.5.1 install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the bluetooth-hci-socket@0.5.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-11-28T07_32_21_944Z-debug.log

根据bluetooth-hci-socket文档,我已经安装了所有依赖项node-gyppythong++

我怀疑这是节点版本冲突。有人能帮我解决这个问题吗?

EN

回答 1

Stack Overflow用户

发布于 2021-05-08 11:00:16

尝试安装@abandonware/noble@abandonware/bluetooth-hci-socket,而不是noblebluetooth-hci-socket

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65047998

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档