Raspberry Pi opencv 3和node-opencv

我成功地在我的覆盆子pi raspbian系统上编译了opencv 3。 现在我正在尝试从几年来获得节点opencv安装,但没有太多的成功。

这是npm的错误输出

npm install -g opencv | opencv@1.0.0 install /usr/local/lib/node_modules/opencv node-gyp rebuild make: Entering directory '/usr/local/lib/node_modules/opencv/build' CXX(target) Release/obj.target/opencv/src/init.o In file included from ../src/init.cc:5:0: ../src/CascadeClassifierWrap.h:5:3: error: 'CascadeClassifier' in namespace 'cv' does not name a type In file included from ../src/init.cc:6:0: ../src/VideoCaptureWrap.h:5:7: error: 'VideoCapture' in namespace 'cv' does not name a type opencv.target.mk:99: recipe for target 'Release/obj.target/opencv/src/init.o' failed make: *** [Release/obj.target/opencv/src/init.o] Error 1 make: Leaving directory '/usr/local/lib/node_modules/opencv/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12) gyp ERR! System Linux 3.12.28+ gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/opencv gyp ERR! node -v v0.10.33 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok npm ERR! opencv@1.0.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the opencv@1.0.0 install script. npm ERR! This is most likely a problem with the opencv package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls opencv npm ERR! There is likely additional logging output above. npm ERR! System Linux 3.12.28+ npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "opencv" npm ERR! cwd /usr/local/include/opencv npm ERR! node -v v0.10.33 npm ERR! npm -v 1.4.28 npm ERR! code ELIFECYCLE npm ERR! not ok code 0 

我真的没有想法,并会在这里得到很多帮助。

非常感谢托马斯

node-opencv还不完全支持OpenCV 3.x。 他们在这里的自述中提到它。 您应该能够在本教程中的RPi2上安装2.4,或者如果您有RPi3,请search同一站点。