3

I am currently experiencing some errors when trying to convert html to pdf using Python, Django and wkhtmltopdf on Ubuntu Server 20.4. See the errors

wkhtmltopdf: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by wkhtmltopdf)
wkhtmltopdf: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /lib/x86_64-linux-gnu/libQt5Core.so.5)
wkhtmltopdf: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libQt5Core.so.5)
wkhtmltopdf: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libQt5Core.so.5)
wkhtmltopdf: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libQt5Core.so.5)
wkhtmltopdf: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libQt5Core.so.5)
wkhtmltopdf: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by /lib/x86_64-linux-gnu/libQt5Core.so.5)
wkhtmltopdf: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libicuuc.so.70)
wkhtmltopdf: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libicuuc.so.70)

Please, some helps. My best regards, Rolando.

1 Answers1

1

The binary "package" you have installed was compiled or built on a system that is in the future, relative to ubuntu 20.

$ docker run  --rm  ubuntu:20.04x dpkg -l | grep libc 
ii  libc-bin                2.31-0ubuntu9.2              amd64        GNU C Library: Binaries
ii  libc6:amd64             2.31-0ubuntu9.2              amd64        GNU C Library: Shared libraries
ii  libcap-ng0:amd64        0.7.9-2.1build1              amd64        An alternate POSIX capabilities library
ii  libcom-err2:amd64       1.45.5-2ubuntu1              amd64        common error description library
ii  libcrypt1:amd64         1:4.4.10-10ubuntu4           amd64        libcrypt shared library

In the output above, you see that the included version of libc is 2.31. The error messages that you pasted indicate that the programs need a later libc runtime.

To solve the issue you can do either of:

  • compile wkhtmltopdf on your system (not recommended)
  • find a version (package) of wkhtmltopdf that is intended for ubuntu 20
  • run the version you have of wkhtmltopdf on a later system such as ubuntu 22