skip to Main Content

I installed wkhtmltox-0.12.6-1.amazonlinux2.x86_64.rpm on my EC2 instance(t3.xlarge).
While using wkhtmltopdf in Node.js, I’m getting the following error:

Error generating PDF: Error: wkhtmltopdf: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory
wkhtmltopdf exited with code 127
    at handleError (/var/www/html/Transectra/node_modules/wkhtmltopdf/index.js:161:16)
    at ChildProcess.<anonymous> (/var/www/html/Transectra/node_modules/wkhtmltopdf/index.js:133:7)
    at ChildProcess.emit (node:events:517:28)
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)

I tried to install libpng15 but can’t able to install it,
but I only want this wkhtmltopdf library

2

Answers


  1. I tried to install with def

    dnf install -y https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox-0.12.6.1-3.almalinux9.$(uname -m).rpm
    

    now check version

    wkhtmltopdf --version
    
    Login or Signup to reply.
  2. It may be version issue of wkhtmltopdf you have to check there website and reinstall supported version for Amazon Linux

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search