return process.dlopen(module,path._makeLong(filename));

Sau*_*mar 12 opencv node.js

从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)

ojr*_*ask 26

尝试刷新已安装的模块

$ rm -rf node_modules/
$ npm update
Run Code Online (Sandbox Code Playgroud)

process.dlopen在使用Gulp和node-sass时遇到了错误.清除已安装的模块为我解决了问题.

编辑:不确定OpenCV如何工作(或实际上是什么),但我认为它处理NodeJS模块类似于常规NodeJS应用程序,您可以在其中刷新模块集合.


小智 5

使用此命令,它可以正常工作:

npm rebuild bcrypt --build-from-source
Run Code Online (Sandbox Code Playgroud)