wooio / htmltopdf-java

An HTML to PDF conversion library written in Java, based on wkhtmltopdf.
MIT License
173 stars 97 forks source link

java.lang.UnsatisfiedLinkError: Unable to load library Native library not found problem, how to install these package on linux? #50

Open wmxl opened 2 years ago

wmxl commented 2 years ago

I meet the problem on the trouble shooting, but I don't know how to install the packages listed?

Missing native dependencies
If you get the following exception:

java.lang.UnsatisfiedLinkError: Unable to load library '/tmp/io.woo.htmltopdf/wkhtmltox/0.12.5/libwkhtmltox.so': Native library (tmp/io.woo.htmltopdf/wkhtmltox/0.12.5/libwkhtmltox.so) not found in resource path
Then that likely means that one of the native dependencies of wkhtmltopdf is not met. It might be worth checking that the following packages are installed:

libc6 (or glibc)
libx11
libxext
libxrender
libstdc++
libssl1.0
freetype
fontconfig
sixiwa commented 1 year ago

I also encountered that except that libssl1.0 could not be installed, everything else was installed, but an error was reported: Native library (tmp/io.woo.htmltopdf/wkhtmltox/0.12.5/libwkhtmltox.so) not found in resource path ([jar:file:/usr/local/java/dsk-datamonitor.jar!/BOOT-INF/classes!/, jar:file:/usr/local/java/dsk-datamonitor.jar!/BOOT-INF/lib/java-jwt-3.18.3.jar!/