Skip to content
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

Unable to load native library. The platform may be missing native dependencies (libjpeg62, etc). Or the current platform is not supported. in linux #48

Closed
adamsaffiullah opened this issue Sep 8, 2021 · 7 comments

Comments

@adamsaffiullah
Copy link

Unable to load native library. The platform may be missing native dependencies (libjpeg62, etc). Or the current platform is not supported. in linux server
.Net core 3.1

@HakanL
Copy link
Owner

HakanL commented Sep 8, 2021

Have you made sure those dependencies are installed?

@harrinson-gutierrez
Copy link

the libraries of each runtime are not exported as they should, it only works on my local machine but on an ubuntu 18.04 server it does not work

@HakanL
Copy link
Owner

HakanL commented Sep 10, 2021

So you're probably missing dependencies to the native htmltopdf library on your Ubuntu 18.04 server. My guess is the libjpeg62 package, but if you install the native dpkg then it will tell you. Obviously this .NET wrapper can't install native dependencies.

@HakanL HakanL closed this as completed Sep 16, 2021
@harrinson-gutierrez
Copy link

harrinson-gutierrez commented Sep 16, 2021

The libjpeg62 libraries even though they are installed on the server does not work, you have to copy the native libraries in the root of the publication project, you also have to install the libssl package in case you have images in https

image

image

@HakanL
Copy link
Owner

HakanL commented Sep 16, 2021

Those steps are definitely not correct, you don't need to download DLL and DYLIB files (Windows and Mac) to your Linux install. But that being said, you shouldn't have to download any files, we have tested this to work fine in docker, but your docker image definitely has to have libjpeg62 (and possibly other dependencies) installed. You can always try run the example docker project as-is first, which is using .NET 3.1 (2.2 as you have in your example isn't out of support by Microsoft). I'm confused if you're trying to use docker, or directly in Ubuntu, your screenshot shows a dockerfile.

@harrinson-gutierrez
Copy link

I'm not using docker but evidence where I get the dependencies libwkhtmltox.dll libwkhtmltox.dydll, libwkhtmltox.so

In theory the nuget should make my life easier by placing the necessary libraries internally, but curiously these are not attached as they should, because even though I install the nuget and the native libgpg62 library and run the service in Ubuntu 18.06 it does not work. But when placing libwkhtmltox.dll libwkhtmltox.dydll
libwkhtmltox.so in the main project path, it works.

@HakanL
Copy link
Owner

HakanL commented Sep 16, 2021

Maybe it's related to #28 if you're using publish. Is the .so file in any subfolder on your Ubuntu machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants