+-
MMM热门单词崩溃

我有MagicMirror,并有了MMM-Hotword。它可以正常工作,但是当它检测到该热门单词时,它就会中断。

这是我得到的:

[HOTWORD] Final Result: { detected: true, hotword: 'Hey Google', file: null }
[AMK2] assistant ready
/home/pi/MagicMirror/node_modules/electron/dist/electron js/electron.js: symbol lookup error: /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/grpc/src/node/extension_binary/electron-v3.0-linux-arm-glibc/grpc_node.node: undefined symbol: __atomic_store_8
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] start: `sh run-start.sh`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] start 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/2019-10-25T14_52_22_946Z-debug.log

并且,日志:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/MagicMirror/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle [email protected]~start: CWD: /home/pi/MagicMirror
10 silly lifecycle [email protected]~start: Args: [ '-c', 'sh run-start.sh' ]
11 info lifecycle [email protected]~start: Failed to exec start script
12 verbose stack Error: [email protected] start: `sh run-start.sh`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:198:13)
12 verbose stack     at maybeClose (internal/child_process.js:982:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid [email protected]
14 verbose cwd /home/pi/MagicMirror
15 verbose Linux 4.19.75-v7+
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
17 verbose node v10.17.0
18 verbose npm  v6.11.3
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] start: `sh run-start.sh`
23 error spawn ENOENT
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

有人知道如何提供帮助吗?谢谢。我与MMM-AssistantMk2一起工作

0
投票

我在Raspberry Pi中使用Assistant Relay遇到了这个问题,并且问题是相同的,似乎是gRPC 1.24的错误或问题,并将其降级为1.23可以解决该问题,但是显然您需要使用gcc-7而不是编译gcc-8。

您可以使用gcc -v检查gcc版本。验证您使用的是7.x。

如果是8.x版本,那么最好不要在安装/降级软件包的过程中费力,而是要同时安装7并根据需要进行切换:

sudo apt-get install --reinstall gcc-7
sudo apt-get install --reinstall g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 50 --slave /usr/bin/g++ g++ /usr/bin/g++-8

然后您可以根据需要使用此命令在7到8之间来回切换:

sudo update-alternatives --config gcc

不使用gcc,您需要安装gRPC 1.23.4并重建:

cd ~/MagicMirror/modules/MMM-AssistantMk2
npm install [email protected]
npm install --save-dev electron-rebuild
./node_modules/.bin/electron-rebuild

这应该可以解决问题。