gpt4 book ai didi

node.js - 树莓派 opencv 3 和 node-opencv

转载 作者:搜寻专家 更新时间:2023-10-31 22:35:38 25 4
gpt4 key购买 nike

我在我的树莓派 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

我真的没有想法,很想在这里得到一些重要的帮助。

非常感谢最好的问候托马斯

最佳答案

node-opencv 还不完全支持 OpenCV 3.x。他们在自述文件中提到了它 here .您应该能够使用此 tutorial 在您的 RPi2 上安装 2.4 ,或者如果您有 RPi3,则搜索同一站点。

关于node.js - 树莓派 opencv 3 和 node-opencv,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26946981/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com