从 OpenCV Node 运行示例时出现此错误
return process.dlopen(module, path._makeLong(filename)); ^ Error: /home/sunny/face/build/opencv/v5.0.0/Release/node-v46-linux-x64/opencv.node: undefined symbol: _ZNK2cv9Algorithm5writeERNS_11FileStorageE at Error (native) at Object.Module._extensions..node (module.js:460:18) at Module.load (module.js:356:32) at Function.Module._load (module.js:313:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (/home/sunny/face/lib/bindings.js:4:15) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32)
最佳答案
尝试通过
刷新已安装的模块$ rm -rf node_modules/
$ npm update
我在使用 Gulp 和 node-sass 时遇到了与 process.dlopen
相关的错误。清除已安装的模块为我解决了这个问题。
编辑:不确定 OpenCV 是如何工作的(或它实际上是什么),但我认为它处理 NodeJS 模块的方式与常规 NodeJS 应用程序类似,您可以在其中刷新模块集合。
关于node.js - return process.dlopen(module, path._makeLong(filename));,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35568243/