我正在尝试安装opencv进行实时车辆检测。在终端中安装opencv时,总是无法安装
Parameshs-MacBook-Air:pyrky_nodejs parameshv $ npm install opencv --save
opencv@6.0.0安装/ Users / parameshv / pyrky_nodejs / node_modules / opencv node-pre-gyp安装--fallback-to-build
node-pre-gyp ERR!试图下载(403):https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v64-darwin-x64.tar.gz
节点预石膏错误!找不到针对opencv@6.0.0和node@10.8.0的预构建二进制文件(node-v64 ABI,未知)(回退到使用node-gyp进行源编译)
节点预石膏错误!试图下载(未定义):https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v64-darwin-x64.tar.gz
节点预石膏错误!找不到针对opencv@6.0.0和node@10.8.0的预构建二进制文件(node-v64 ABI,未知)(回退到使用node-gyp进行源编译)
CXX(目标)版本/obj.target/opencv/src/init.o
CXX(目标)版本/obj.target/opencv/src/init.o
sed:./ Release / .deps / Release / obj.target / opencv / src / init.o.d.raw:没有这样的文件或目录
make:*** [Release / obj.target / opencv / src / init.o]错误1
CXX(目标)版本/obj.target/opencv/src/Matrix.o
糟糕!建立错误
糟糕!堆栈错误:make
失败,退出代码:2
糟糕!堆栈在ChildProcess.onExit(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
糟糕!堆栈在ChildProcess.emit(events.js:182:13)
糟糕!堆栈位于Process.ChildProcess._handle.onexit(内部/child_process.js:238:12)
糟糕!系统达尔文17.7.0
糟糕!命令“ /usr/local/Cellar/node/10.8.0/bin/node”“ /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js”“ build”“- -fallback-to-build“” --module = /用户/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node“”-模块名称= opencv“” --module_path = /用户/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64“
糟糕! cwd /用户/ parameshv / pyrky_nodejs / node_modules / opencv
糟糕!节点-v v10.8.0
糟糕!节点gyp -v v3.7.0
糟糕!不好
节点预石膏错误!建立错误
节点预石膏错误!堆栈错误:无法执行'/usr/local/Cellar/node/10.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build- fallback-to-build --module = /用户/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node --module_name = opencv --module_path = /用户/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64'(1)
节点预石膏错误!堆栈在ChildProcess上。 (/用户/parameshv/pyrky_nodejs/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
节点预石膏错误!堆栈在ChildProcess.emit(events.js:182:13)
节点预石膏错误!在也许关闭处堆叠(internal / child_process.js:962:16)
节点预石膏错误!堆栈位于Process.ChildProcess._handle.onexit(内部/child_process.js:249:5)
节点预石膏错误!系统达尔文17.7.0
节点预石膏错误!命令“ /usr/local/Cellar/node/10.8.0/bin/node”“ /Users/parameshv/pyrky_nodejs/node_modules/.bin/node-pre-gyp”“安装”“ --fallback-to-build”
节点预石膏错误! cwd /用户/ parameshv / pyrky_nodejs / node_modules / opencv
节点预石膏错误!节点-v v10.8.0
节点预石膏错误!节点pre-gyp -v v0.6.39
节点预石膏错误!不好
无法执行'/usr/local/Cellar/node/10.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to -build --module = /用户/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node --module_name = opencv --module_path = / Users / parameshv / pyrky_nodejs / node_modules / opencv / build / opencv / v6.0.0 / Release / node-v64-darwin-x64'(1)
npm WARN opencv@6.0.0捆绑了与所需版本不匹配的软件包。它们已替换为非捆绑版本。
npm WARN pyrky@1.0.0没有存储库字段。
npm错误!代码ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv@6.0.0安装:node-pre-gyp install --fallback-to-build
npm ERR!退出状态1
npm ERR!
npm ERR!在opencv@6.0.0安装脚本处失败。
npm ERR! npm可能不是问题。上面可能还有其他日志记录输出。
npm错误!可以在以下位置找到此运行的完整日志: npm ERR! /Users/parameshv/.npm/_logs/2018-09-04T05_34_09_181Z-debug.log Parameshs-MacBook-Air:pyrky_nodejs parameshv $ Parameshs-MacBook-Air:pyrky_nodejs parameshv $ Parameshs-MacBook-Air:pyrky_nodejs parameshv $ ../src/Matrix.cc:2:10:致命错误:找不到“ Matrix.h”文件
^~~~~~~~~~
1个错误。
make:*** [Release / obj.target / opencv / src / Matrix.o]错误1
糟糕!建立错误
糟糕!堆栈错误:make
失败,退出代码:2
糟糕!堆栈在ChildProcess.onExit(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
糟糕!堆栈在ChildProcess.emit(events.js:182:13)
糟糕!堆栈位于Process.ChildProcess._handle.onexit(内部/child_process.js:238:12)
糟糕!系统达尔文17.7.0
糟糕!命令“ /usr/local/Cellar/node/10.8.0/bin/node”“ /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js”“ build”“- -fallback-to-build“” --module = /用户/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node“”-模块名称= opencv“” --module_path = /用户/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64“
糟糕! cwd /用户/ parameshv / pyrky_nodejs / node_modules / opencv
糟糕!节点-v v10.8.0
糟糕!节点gyp -v v3.7.0
糟糕!不好
试图修复此安装
自酿啤酒/科学
简单安装pkg-config opencv @ 2
brew链接opencv @ 2 --force
npm install opencv --save
如何在Mac OS中安装opencv npm?任何帮助都非常感谢....