Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

node.js

opencv

I am getting this error when running an example from 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)
like image 236
Saurav kumar Avatar asked Feb 23 '16 03:02

Saurav kumar


2 Answers

Try refreshing your installed modules by

$ rm -rf node_modules/
$ npm update

I got errors relating to process.dlopen when using Gulp and node-sass. Clearing the installed modules fixed the issue for me.

EDIT: Not certain how OpenCV works (or what it actually is), but I presume it handles NodeJS modules similarly to regular NodeJS applications, where you can refresh the module collection.

like image 55
ojrask Avatar answered Nov 15 '22 10:11

ojrask


Use this command, it works fine:

npm rebuild bcrypt --build-from-source
like image 10
Amol Barshile Avatar answered Nov 15 '22 12:11

Amol Barshile