title: How to run OpenCvSharp on Ubuntu 18.04?
body: <p>I have a problem with running OpenCvShare on the Ubuntu Linux. It keeps saying that libOpenCvSharpExtern is not found.</p>
  
  <p>I have a problem with running OpenCvSharp on my Ubuntu 18.04.1 x64. I have created a .NET Core/Standard solution (Standard is a library project, Core is the runner). The library project references Nuget packages:
  OpenCvSharp4 (4.0.0.20181225)
  OpenCvSharp4.runtime.ubuntu.18.04-x64 (4.0.0.20181225).</p>
  
  <p>Then, after a succesfull compilation, I published the runner project using:</p>
  
  <pre><code>dotnet publish -c Release -r ubuntu.18.04-x64
  </code></pre>
  
  <p>The, when I run the executable on Ubuntu, following error is thrown:</p>
  
  <p><code>Unhandled Exception: OpenCvSharp.OpenCvSharpException: Failed to create VideoCapture System.TypeInitializationException: The type initializer for 'OpenCvSharp.NativeMethods' threw an exception. OpenCvSharp.OpenCvSharpException: Unable to load shared library 'OpenCvSharpExtern' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libOpenCvSharpExtern: cannot open shared object file: No such file or directory ---&gt; System.DllNotFoundException: 
  Unable to load shared library 'OpenCvSharpExtern' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libOpenCvSharpExtern: cannot open shared object file: No such file or directory</code></p>
  
  <p>The file libOpenCvSharpExtern.so is in the same path that the executable, I have copied it inside usr/local/lib as well, and id didn't help. Aplication is meant to detect faces based on the camera feed.</p>