zakird / wkhtmltopdf_binary_gem

Ruby gem containing easily installable access to wkhtmltopdf application
https://rubygems.org/gems/wkhtmltopdf-binary
Apache License 2.0
179 stars 341 forks source link

Does not work on Ubuntu 24.04 server #175

Closed cvalerio closed 15 hours ago

cvalerio commented 1 month ago

When trying to run on Ubuntu 24.04 server, it breaks with this error:

Invalid platform, must be running on Ubuntu 16.04/18.04/20.04/22.04, CentOS 6/7/8, Debian 9/10/11/12, Archlinux amd64, Debian 9/10/11/12 arm64, or Intel-based Cocoa macOS (missing binary: /app/vendor/bundle/ruby/3.3.0/gems/wkhtmltopdf-binary-0.12.6.7/bin/wkhtmltopdf_ubuntu_24.04_amd64

The same happens in a container FROM ubuntu:24.04.

PS: a workaround is to copy wkhtmltopdf_ubuntu_22.04_amd64.gz as wkhtmltopdf_ubuntu_24.04_amd64.gz, but would be better a specific support.

unixmonkey commented 1 month ago

There is no official build for 24.04 on https://wkhtmltopdf.org/downloads.html, and since the project is archived, there may never be. Glad to hear the 22 binary works though.

You could probably add another conditional below this line and PR that to help others: https://github.com/zakird/wkhtmltopdf_binary_gem/blob/master/bin/wkhtmltopdf#L46

EnriqueRapela-AMAC commented 1 month ago

Hello, is it known if the build for Ubuntu 24.04 is going to be added. Or is there any way to solve this problem without having to change the Ubuntu version?

bhavesh-vadhvana commented 1 week ago

RuntimeError (Failed to execute: ["/home/scpl/.asdf/installs/ruby/3.1.2/bin/wkhtmltopdf", "--footer-right", "[page] of [topage]", "file:////tmp/wicked_pdf20240825-775216-i438c6.html", "/tmp/wicked_pdf_generated_file20240825-775216-jy60it.pdf"] Error: PDF could not be generated! Command Error: /home/scpl/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf:69:in <top (required)>': Invalid platform, must be running on Ubuntu 16.04/18.04/20.04/22.04, CentOS 6/7/8, Debian 9/10, Archlinux amd64, or Intel-based Cocoa macOS (missing binary: /home/scpl/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_ubuntu_24.04_amd64). (RuntimeError) from /home/scpl/.asdf/installs/ruby/3.1.2/bin/wkhtmltopdf:25:inload' from /home/scpl/.asdf/installs/ruby/3.1.2/bin/wkhtmltopdf:25:in `

' ):

Hello, please can you help, it not work Ubuntu version 24.04

unixmonkey commented 15 hours ago

Ubuntu 24.04 was added in #178 and in the current gem version (0.12.6.8). Please upgrade and let me know if you are still having issues.