Skip to content

When I run in a docker, I get The type initializer for 'OpenCvSharp.Internal.NativeMethods' threw an exception #1771

Open
@Mishatopkek

Description

@Mishatopkek

I tried to use OpenCvSharp4.official.runtime.linux-x64 with OpenCvSharp4 I get the error below

Unhandled exception. System.TypeInitializationException: The type initializer for 'OpenCvSharp.Internal.NativeMethods' threw an exception.
2025-06-30T20:30:16.176396015Z  ---> System.DllNotFoundException: Unable to load shared library 'OpenCvSharpExtern' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
2025-06-30T20:30:16.176405609Z /app/runtimes/linux-x64/native/OpenCvSharpExtern.so: cannot open shared object file: No such file or directory
2025-06-30T20:30:16.176411681Z /usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.6/OpenCvSharpExtern.so: cannot open shared object file: No such file or directory
2025-06-30T20:30:16.176416855Z libtesseract.so.4: cannot open shared object file: No such file or directory
2025-06-30T20:30:16.176422258Z /usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.6/libOpenCvSharpExtern.so: cannot open shared object file: No such file or directory
2025-06-30T20:30:16.176427738Z /app/runtimes/linux-x64/native/OpenCvSharpExtern: cannot open shared object file: No such file or directory
2025-06-30T20:30:16.176432998Z /usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.6/OpenCvSharpExtern: cannot open shared object file: No such file or directory
2025-06-30T20:30:16.176438182Z /app/runtimes/linux-x64/native/libOpenCvSharpExtern: cannot open shared object file: No such file or directory
2025-06-30T20:30:16.176443203Z /usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.6/libOpenCvSharpExtern: cannot open shared object file: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions