Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support debian 12 bookworm (add new binaries) #162

Closed
adamzapasnik opened this issue Jun 15, 2023 · 18 comments
Closed

support debian 12 bookworm (add new binaries) #162

adamzapasnik opened this issue Jun 15, 2023 · 18 comments

Comments

@adamzapasnik
Copy link

some of ruby docker images were upgraded from debian bullseye to bookworm a few days ago. This error has started to occur since then:

gems/wkhtmltopdf-binary-0.12.6.5/bin/wkhtmltopdf_debian_10_amd64: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Think we need new binaries for debian 12 something akin to #145

(My current workaround is to use bullseye images)

@igorkasyanchuk
Copy link

@adamzapasnik please tell me how you solved this issue for now? What did you put in the Gemfile?

@adamzapasnik
Copy link
Author

@igorkasyanchuk I didn't modify a Gemfile. I updated docker images tags from: ruby:3.2 to ruby:3.2-bullseye. Does it answer your question?

@igorkasyanchuk
Copy link

thanks for reply, trying what you suggested 👍

@bibstha
Copy link

bibstha commented Jun 18, 2023

Bumping this. I also started getting this issue all of a sudden. I'm using registry.docker.com/library/ruby:3.1.4-slim image and no change in Dockerfile.
Creating a symlink doesn't help. I tried the following but doesn't work.

# ln -sv /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/libssl.so.1.1
# ln -sv /usr/lib/x86_64-linux-gnu/libcrypt.so /usr/lib/libcrypto.so.1.1
# bundle exec /usr/local/bundle/ruby/3.1.0/bin/wkhtmltopdf
/usr/local/bundle/ruby/3.1.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64: /lib/libssl.so.1.1: version `OPENSSL_1_1_0' not found (required by /usr/local/bundle/ruby/3.1.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64)
/usr/local/bundle/ruby/3.1.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64: /lib/libcrypto.so.1.1: version `OPENSSL_1_1_0' not found (required by /usr/local/bundle/ruby/3.1.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64)

@WhisperClaims
Copy link

WhisperClaims commented Jun 20, 2023

Same issue for us, fantastic blame pointing and solution suggesting from @igorkasyanchuk 🥳 we changed the base image from ruby-3.2.2 to ruby-3.2.2-bullseye

@shubhamMishra112
Copy link

Same issue for us,

RuntimeError Failed to execute: ["/usr/local/bundle/bin/wkhtmltopdf", "--enable-local-file-access", "--orientation", "landscape", "--page-size", "A3", "file:////tmp/wicked_pdf20230705-21-m0s5hb.html", "/tmp/wicked_pdf_generated_file20230705-21-zglj39.pdf"] Error: PDF could not be generated! Command Error: /usr/local/bundle/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory

we ugraded our server OS to debian 12 and started getting this same error,

@mcg
Copy link

mcg commented Sep 7, 2023

Just hit this trying an update to Bookworm.

@mcg
Copy link

mcg commented Sep 7, 2023

Fyi, it appears the binary has been build for bookworm, wkhtmltopdf/packaging#155

@hrdwdmrbl
Copy link

hrdwdmrbl commented Oct 10, 2023

I DID IT!

I was using fullstaq-ruby:3.2.2-jemalloc-slim and I was getting /rails/vendor/ruby/3.2.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory

I was able to install the correct wkhtmltopdf binary using:

apt-get install software-properties-common
add-apt-repository 'deb http://ftp.us.debian.org/debian bookworm main'
apt-get update && apt install wkhtmltopdf

but then I got weird errors about glibc so I also switched to ruby:3.2.2-bullseye like everyone else

@mcg
Copy link

mcg commented Oct 27, 2023

Sorry to poke this again, but will we see a new gem with the bookworm update?

@mende1
Copy link

mende1 commented Feb 6, 2024

@igorkasyanchuk I didn't modify a Gemfile. I updated docker images tags from: ruby:3.2 to ruby:3.2-bullseye. Does it answer your question?

Works wonderfuly wonderfully for me. Thankx

@diei
Copy link

diei commented Apr 16, 2024

Please provide a new binary. I get the same error with the Docker image ruby:3.3.0-bookworm:

/usr/local/bundle/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

@jalaj-hn
Copy link

jalaj-hn commented Apr 16, 2024

Please provide a new binary. I get the same error with the Docker image ruby:3.3.0-bookworm:

/usr/local/bundle/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Try ruby:3.2.2-bullseye

@diei
Copy link

diei commented Apr 16, 2024

@jalaj-hn, ruby:3.3.0-bullseye works, but this should be only a temporarily workaround. I have updated all my systems to Debian Bookworm and only wkhtmltopdf prevents the update of the last system.

@mcg
Copy link

mcg commented Apr 16, 2024

As I mentioned in #162 (comment) the binary for Bookworm exists, it's a matter of a PR here to include support for it. I see a few open PR's that add support for other distros/archs, so I am unsure if the project is active and would accept a PR. Given the state of https://github.com/wkhtmltopdf/packaging being archived, I do wonder how much longer can expect any of this to be supported.

@unixmonkey
Copy link
Collaborator

Well, originally there was really just a handful of "fat" binaries in this project, because that's what was distributed through official wkhtmltopdf releases. That made it really easy to have a gem with just a few binaries (Windows, MacOS, Linux x86, Linux x64).

Then wkhtmltopdf changed it's process to release different versions for every distribution, and this project has exploded to be hundreds of megabytes from including all the different variants. I'm pretty sure there might be different versions of wkhtmtopdf in here too. It used to be each version of this gem tracked a specific version of wkhtmltopdf.

I'm not at all against adding support for more variants and versions, but something needs to be done to control how big this project gets, and I hesistate on accepting a binary without comparing it's checksum to an official release. I wouldn't want someone to get a poisoned binary from this project.

@mcg
Copy link

mcg commented Apr 16, 2024

@unixmonkey is "wkhtmltopdf/packaging" where the official releases live? If so then at least they have an official for Bookworm. I was also looking at #129 which is attempting to remove the bloat from all the binaries. Is that something worth doing considering the state of wkhtmltopdf generally?

@unixmonkey
Copy link
Collaborator

Debian 12 support (amd64/i386/arm64) is now in version 0.12.6.7. Please check it and make sure it works for you, and reopen if it doesn't. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests