我正在尝试在运行 Ubuntu 12.04 的 Beaglebone 上运行 Node Arduino 库 [https://github.com/rwldrn/johnny-5]。但是,当我尝试运行示例程序(servo.js 或任何其他程序)时,控制台会吐出:
/home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/node_modules/bindings/bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/build/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/build/Debug/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/build/Release/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/out/Debug/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/Debug/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/out/Release/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/Release/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/build/default/serialport.node
→ /home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/compiled/0.8.15/linux/arm/serialport.node
at bindings (/home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/node_modules/bindings/bindings.js:88:9)
at Object.<anonymous> (/home/rov/node_modules/johnny-five/node_modules/firmata/node_modules/serialport/serialport.js:7:44)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/rov/node_modules/johnny-five/node_modules/firmata/lib/firmata.js:9:18)
at Module._compile (module.js:449:26)
我尝试通过 npm (npm install serialport) 安装串行端口,但仍然遇到相同的错误。如何安装 serialport 以便它可以被servo.js 文件识别?