I'm trying to run simple console app on Raspberry PI 4b, that uses OpencvSharp4 libs w/ dontet 6.
Code is simple:
Console.WriteLine(OpenCvSharp.Cv2.GetVersionString())
But it's failing with error:
Unhandled exception. System.TypeInitializationException: The type initializer for 'OpenCvSharp.Internal.NativeMethods' threw an exception.
---> 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
Environment
Raspberry pi 4b.
Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
What did you do when you faced the problem?
Tried this package: OpenCvSharp4.runtime.linux-arm
Didn't help. Tried copy libOpenCvSharpExtern.so from /runtimes folder to dotnet output. Didn't help.
Unhandled exception. System.TypeInitializationException: The type initializer for 'OpenCvSharp.Internal.NativeMethods' threw an exception.
---> 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
at OpenCvSharp.Internal.NativeMethods.redirectError(CvErrorCallback errCallback, IntPtr userdata, IntPtr& prevUserdata)
at OpenCvSharp.Internal.ExceptionHandler.RegisterExceptionCallback()
at OpenCvSharp.Internal.NativeMethods.LoadLibraries(IEnumerable`1 additionalPaths)
at OpenCvSharp.Internal.NativeMethods..cctor()
--- End of inner exception stack trace ---
at OpenCvSharp.Internal.NativeMethods.core_getVersionString(Byte* buf, Int32 maxLength)
at OpenCvSharp.Cv2.GetVersionString()
at Program.<Main>$(String[] args) in /home/pi/opencv_test/Program.cs:line 3
Summary of your issue
I'm trying to run simple console app on Raspberry PI 4b, that uses OpencvSharp4 libs w/ dontet 6. Code is simple:
Console.WriteLine(OpenCvSharp.Cv2.GetVersionString())
But it's failing with error:Environment
Raspberry pi 4b. Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
What did you do when you faced the problem?
Tried this package: OpenCvSharp4.runtime.linux-arm Didn't help. Tried copy libOpenCvSharpExtern.so from /runtimes folder to dotnet output. Didn't help.
Example code:
Output:
What did you intend to be?