Question - Wkhtmltopdf error in Docker installation on CentOS 7

wkhtmltopdf installed as follows:
rpm -Uvh wkhtmltox-0.12.6-1.centos7.x86_64.rpm
also, I’ve tried to install it as below:
yum install wkhtmltox-0.12.6-1.centos7.x86_64.rpm

But I have got this error when trying to generate test pdf:

“An error occurred while we tried to generate a test pdf - the configured path or the library is wrong, please review the installation”

I’ve tested the tool as follows and it’s working properly
wkhtmltopdf test.pdf

My installation stack:

  • CentOS: 7.9
  • Selinux: Enforcing
  • Docker Engine - Community Version: 20.10.21
  • Eramba Community version: 3.16.2
  • wkhtmltopdf version: 0.12.6 (with patched qt)
  • WKHTMLTOPDF path to bin file: /usr/local/bin/wkhtmltopdf
  • access permission to wkhtmltopdf: -rwxr-xr-x. root root


Can you try to generate this pdf:

wkhtmltopdf https://yourerambadomain/settings/test-pdf test.pdf

Eramba needs to connect to the server itself, too.

hi @sam
yes I run it and it worked just fine

I don’t have much knowledge in Docker, so is there an issue in the way I’ve installed the package?
should I install it in eramba container? how?


Ah, you are doing this directly on the server.
You have to do it from the eramba container, go into the eramba container and test from there.
docker exec -it eramba bash

I got this error:

wkhtmltopdf: error while loading shared libraries: cannot open shared object file: No such file or directory

This workaround should help: virtualbox - Ubuntu 18.4 cannot open shared object file: No such file or directory - Ask Ubuntu

strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/

We will include it in our docker image

1 Like

Thanks a lot, the command helped and it’s working, from eramba container as well as from web console

after rebooting the server, containers were not started so I’ve started by this command:

docker container start eramba
docker container start mysql
docker container start redis
docker container start cron

however, above issue of wkhtmltopdf occurred again. then I’ve added below commands to run containers after system reboot, for each above container
docker update --restart always eramba
but didn’t fix

Then I have run this command again,
--remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/
but not fixed it

this command work in eramba container and in the server with IP address or FQDN, not with DNS A record
wkhtmltopdf https://yourerambadomain/settings/test-pdf test.pdf

Can you please help?


The restart policy was already implemented into our docker repo, most probably, you just need to update it.
Regarding the pdf library problem, we don’t know your infrastructure, of course. We can try to do a call so I understand where the problem might lay. Please write us to