树莓派opencv 3和node-opencv

6

我已经在我的树莓派raspbian系统上成功编译了opencv 3。现在我尝试很久了,但并没有太大的成功来安装node-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

我确实缺乏思路,非常需要一些重要的帮助。
非常感谢 最好的祝福 Thomas

有没有人能提供帮助?我真的非常感激。我已经不知道该怎么做了。 - user3289757
在MacOSX 10.10上出现了相同的错误。我想知道node opencv包是否只能与OpenCV 2.x一起使用... - Sean Doyle
你已经解决了这个问题吗? - user3289757
不过,我看到它已经作为一个问题发布在node opencv项目上了(https://github.com/peterbraden/node-opencv/issues/191)。 - Sean Doyle
1个回答

0

node-opencv目前还不完全支持OpenCV 3.x。他们在自述文件这里中提到了这一点。您应该能够通过这个教程在您的RPi2上安装2.4版本,或者如果您有RPi3,可以在同一网站上搜索相关信息。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接