title: Error: libopencv_dnn.so.3.4: cannot open shared object file when using node-opencv
body: <p>I'm using the <a href="https://github.com/peterbraden/node-opencv" rel="nofollow noreferrer">opencv</a> library for Node, and am running into some weird path issue on Linux</p>
  
  <p>When simply issuing <code>require('opencv');</code>, I get the following error:</p>
  
  <pre><code>Error: libopencv_dnn.so.3.4: cannot open shared object file: No such file or directory
      at Object.Module._extensions..node (internal/modules/cjs/loader.js:730:18)
      at Module.load (internal/modules/cjs/loader.js:600:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
      at Function.Module._load (internal/modules/cjs/loader.js:531:3)
      at Module.require (internal/modules/cjs/loader.js:637:17)
      at require (internal/modules/cjs/helpers.js:22:18)
  </code></pre>
  
  <p>I looked at <a href="https://github.com/peterbraden/node-opencv/blob/master/binding.gyp" rel="nofollow noreferrer">binding.gyp</a> and if I execute the <a href="https://github.com/peterbraden/node-opencv/blob/master/utils/find-opencv.js" rel="nofollow noreferrer">find-opencv.js</a> utility I get what <em>seems</em> to be a sane answer:</p>
  
  <pre><code>/usr/src/app/node_modules/opencv# node utils/find-opencv.js --libs
  -L/usr/local/lib -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core
  </code></pre>
  
  <p>I can see <em>opencv_dnn</em> in there, and if I <code>ls</code> the libs directory:</p>
  
  <pre><code>ls -l /usr/local/lib | grep dnn
  lrwxrwxrwx 1 root root        20 Mar 20 17:23 libopencv_dnn.so -&gt; libopencv_dnn.so.3.4
  lrwxrwxrwx 1 root root        22 Mar 20 17:23 libopencv_dnn.so.3.4 -&gt; libopencv_dnn.so.3.4.5
  -rw-r--r-- 1 root root  12970608 Mar 20 17:20 libopencv_dnn.so.3.4.5
  </code></pre>
  
  <p>I see that <strong><code>libopencv_dnn.so.3.4</code></strong> definitely exists.</p>
  
  <p>Not really sure what my next step is here...</p>