[Jetson] libOpenCvSharpExtern: cannot open shared object file: No such file or directory
See original GitHub issueSummary of your issue
I’m trying to use opencvsharp in Jetson. The app is .NET 5 console app. I added OpenCvSharp4
and OpenCvSharp4.runtime.linux-arm
. I got error libOpenCvSharpExtern: cannot open shared object file: No such file or directory
.
- I’m not sure about
OpenCvSharp4.runtime.linux-arm
, can it work forlinux-arm64
? Or I need to build from source code by myself? If yes, do we have any instruction for this (jetson)? - What about OpenCV 4.1.1, is it supported by
opencvsharp
?
Environment
- Jetson Nano (linux-arm64)
- OpenCV 4.1.1
- .NET 5 Console App
Example code:
var videoCapture = new VideoCapture();
videoCapture.Open(0);
var frame = new Mat();
var frameId = 0;
var maxFrame = 1;
while (videoCapture.IsOpened())
{
if(videoCapture.Read(frame))
{
frameId++;
var image = BitmapConverter.ToBitmap(frame);
image.Save($"{frameId}.jpg");
if (frameId >= maxFrame)
{
break;
}
}
}
Output:
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.videoio_VideoCapture_new1(IntPtr& returnValue)
at OpenCvSharp.VideoCapture..ctor()
at Program.Main(String[] args) in /Program.cs:line 18
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
throwing error when running Yolo on jetson Nano (cannot ...
I am trying to run this Yolo model on Jetson Nano ... Yolo on jetson Nano (cannot open shared object file: No such...
Read more >How to run OpenCvSharp on Ubuntu 18.04?
I have a problem with running OpenCvShare on the Ubuntu Linux. It keeps saying that libOpenCvSharpExtern is not found. I have a problem...
Read more >opencvsharp
Native binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so) is required to work OpenCvSharp. To use OpenCvSharp, you should add both OpenCvSharp4 and ...
Read more >Installing Ubuntu 20.04 LTS and running YOLOv4 ...
in my case I was facing this error: Error while loading shared libraries: lcublas: cannot open shared object file: No such file or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@leopripos the attached file I built works well on Jetson, but it’s not the latest version. libOpenCvSharpExtern for Jetson you can have a try.
Hi and first let me thanks @shimat and all the contributors to this great library. I am having the same question about the linux-arm64 runtime identifier. It appears as if the linux-arm package is not compatible with ARM64. The LoadLibrary call on the linux-arm version fails (I verified that the O/S can find it). I know we could probably try to build it ourselves but it’s a bit of a chore if you are not deeply familiar with CMake and such. So if there are any plans to create a linux-arm64 package that would be great to know. Thanks