-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One or more errors occurred. (Unable to load shared library 'libwkhtmltox' or one of its dependencies #179
Comments
Did you find a solution to this, I'm having exactly the same issue on linux |
@novocodev The issue lay with my previous docker image, where I was using Debian. However, after switching to Ubuntu, the problem was resolved, and the new configuration works seamlessly. Below is my Docker file; I hope it proves useful to you. Also please make sure you have the libwkhtmltox.dll, libwkhtmltox.dylib and libwkhtmltox.so in your root directory.
|
I have fixed this problem in .NET 8 Needed below lines of code to dockerfile between: And need to have the libwkhtmltox.dll, libwkhtmltox.dylib and libwkhtmltox.so in your root directory and additional links below in the .csproj file:
|
Currently, I am using a Linux container, and I encountered the following error: "One or more errors occurred. (Unable to load shared library 'libwkhtmltox' or one of its dependencies)"
I have included the stack trace for further analysis.
System.DllNotFoundException: Unable to load shared library 'libwkhtmltox' 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:
/app/runtimes/linux-arm64/native/libwkhtmltox.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.8/libwkhtmltox.so: cannot open shared object file: No such file or directory
/app/libwkhtmltox.so: cannot open shared object file: No such file or directory
/app/runtimes/linux-arm64/native/liblibwkhtmltox.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.8/liblibwkhtmltox.so: cannot open shared object file: No such file or directory
/app/liblibwkhtmltox.so: cannot open shared object file: No such file or directory
/app/runtimes/linux-arm64/native/libwkhtmltox: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.8/libwkhtmltox: cannot open shared object file: No such file or directory
/app/libwkhtmltox: cannot open shared object file: No such file or directory
/app/runtimes/linux-arm64/native/liblibwkhtmltox: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.8/liblibwkhtmltox: cannot open shared object file: No such file or directory
/app/liblibwkhtmltox: cannot open shared object file: No such file or directory
at DinkToPdf.WkHtmlToXBindings.wkhtmltopdf_init(Int32 useGraphics)
at DinkToPdf.PdfTools.Load()
at DinkToPdf.BasicConverter.Convert(IDocument document)
at DinkToPdf.SynchronizedConverter.<>n__0(IDocument document)
at DinkToPdf.SynchronizedConverter.<>c__DisplayClass5_0.b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
Here is the code from my Dockerfile, along with the various packages I have tried in my attempts to resolve the issue.
The application functions properly when hosted in IIS, but encounters issues when running within a linux container.
Below DLL are present in the root directory.
libwkhtmltox.dll
libwkhtmltox.dylib
libwkhtmltox.so
The text was updated successfully, but these errors were encountered: