Missing Library on Dockerized App

Hey there its me again, could you maybe add default support for linux?

since in docker it sometimes throws me an exception, well mostly i haven’t been able to figure out why it possibly works from time to time but it actually shouldn’t i belive.

See this Bug on Tesseract

Linux support missing for .NET Core · Issue #503 · charlesw/tesseract · GitHub I would greatly apprechiate it.

Edit: Actually the file is in the container, its just wrongly named.

Edit2: -

Edit3: weirdly now only these are missing

Error MSG:
“DllNotFoundException: Unable to load shared library ‘libdl.so’ 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:
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0-rc.2.23479.6/libdl.so: cannot open shared object file: No such file or directory
/app/bin/Debug/net8.0/libdl.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0-rc.2.23479.6/liblibdl.so: cannot open shared object file: No such file or directory
/app/bin/Debug/net8.0/liblibdl.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0-rc.2.23479.6/libdl.so.so: cannot open shared object file: No such file or directory
/app/bin/Debug/net8.0/libdl.so.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0-rc.2.23479.6/liblibdl.so.so: cannot open shared object file: No such file or directory
/app/bin/Debug/net8.0/liblibdl.so.so: cannot open shared object file: No such file or directory”

[External Code]
[Exception] aXc_PdfService.dll!aXc_PdfService.PdfDocumentHelper.LoadWithOcrAsync(System.IO.Stream pdfStream, System.Threading.CancellationToken cancellationToken) Line 20 C#
[Exception] aXc_PdfService.dll!aXc_PdfService.PdfSplitter.SplitPdfAsync(System.IO.Stream splittingPdfStream, aXc_PdfService.SplitMarkersConfiguration splitMarkersConfiguration, System.Threading.CancellationToken cancellationToken) Line 12 C#
[Exception] aXc_PdfService.dll!aXc_PdfService.PdfSplitter.SplitPdfAsync(System.IO.Stream splittingPdfStream, aXc_PdfService.SplitMarkersConfiguration splitMarkersConfiguration, System.Threading.CancellationToken cancellationToken) Line 56 C#
[Exception] aXc_PdfService.dll!aXc_PdfService.Program.Main.AnonymousMethod__4_3(aXc_PdfService.PdfMergeGroup pdfMergeGroup, System.Threading.CancellationToken cancellationToken) Line 84 C#
[External Code]
aXc_PdfService.dll!aXc_PdfService.Program.Main() Line 80 C#
[External Code]

As far i can tell these should be standard libraries, i tried including some libraries like:
RUN apt-get update
&& apt-get install -y --no-install-recommends
ca-certificates
libc6
libgcc-s1
libstdc++6
tzdata
zlib1g
&& rm -rf /var/lib/apt/lists/*

but it didn’t help at all. I tried searching the dockerfile but i couldn’t find it. Ngl this is baffling for me on monday it worked just fine now 1 day later it just doesn’t. Well anyway i keep trying.

Edit4: i also made a Q&A in MS image git repo just incase its there:

Edit5: This is probably the best thing i found from all around the www linux - How to address crash due to missing libdl.so on Ubuntu 22? - Stack Overflow
What i also forgot to mention is i switched from VS Professional to Community bc of trial ending :slight_smile:

Edit6: Since i found the Libraries in the docker i’m pretty sure the issue lies on your part in referencing the old unix stuff.

Edit7: I tried to set the path manually to OcrReadOptions.LibraryPath = “/app/bin/Debug/net8.0/x64/libleptonica-1.82.0.so”;(i also tried without filename and with AppDomain.CurrentDomain.BaseDirectory (which you do as i’ve read in the OcrReaderOptions aswell)) but its not working. :frowning: also this is no solution i don’t like setting a if statement which cares about debug or release ngl.

Funny thing the file is therei validated it each time with taking a peek in the container.

The other issue with libdl.so i solved with a symbolic link for now, should still be solved on ur side ngl.

Kindly
K

Hi K,

Can you please try again with these latest NuGet packages:

Install-Package GemBox.Pdf -Version 17.0.1428-hotfix
Install-Package GemBox.Pdf.Ocr -Version 17.0.1428-hotfix

Note that these are hidden pre-released versions, to install them you’ll need to run the above command on the NuGet Package Manager Console (Tools → NuGet Package Manager → Package Manager Console).

Does this solve your issue?

If the problem remains, please send us a small Visual Studio project that reproduces your issue so that we can investigate it.

Regards,
Mario

Sadly this doesn’t do the trick, i will upload it and send you a link for the download, i think the projects to big for a mail but i can send you a link for a gitrepository (in the Mail though).