OpenCV的这个错误(我试图使用Node + OpenCV - 就像在node-opencv中一样)一直让我发疯。我已经在StackOverflow或其他方面看了很多答案,我认为这可能是升级后的Homebrew或OpenCV的问题。除非我导入OpenCV的方式有问题。
有谁理解这个/知道该怎么做?
module.js:598
return process.dlopen(module, path._makeLong(filename));
^
Error: dlopen(/Users/Joe/SRS/node_modules/opencv/build/opencv/v6.0.0/Release/node-v51-darw
in-x64/opencv.node, 1): Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib
Referenced from: /usr/local/opt/opencv/lib/libopencv_highgui.2.4.dylib
Reason: image not found
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Joe/SRS/node_modules/opencv/lib/bindings.js:4:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
答案 0 :(得分:2)
我遇到了同样的错误并重新安装了Open CV修复它。我跑了 brew重新安装--build-from-source opencv。