Closed rewish closed 4 years ago
Has anyone compiled it this with statically linked dependencies? What's the size of the executable? This would avoid the OS nonsense.
@tbugai How did you build?
The latest binaries were downloaded from the wkhtmltopdf project page.
Keep in mind, the more libraries that get statically built into the binary the larger the binary is going to be. They already weigh in at about 40MB each. Systems like heroku limit the deployed project size so this becomes an issue as all three binaries are included in the gem.
Hmmm.
Since it does not support 32-bit from the CentOS 7 or later, the 32-bit CentOS 6 may not be a big problem...
Was a workaround for this ever figured out on Centos 32 bit?
this is also an issue on the new heroku cedar-14 stack
I solved this by grabbing the v8 file out of another distro's repository (found through a simple google search for the file itself) and manually scp'ing it into the usr/library folder. As long as you don't change any existing symlinks (v6 or whatever it is) you shouldn't disrupt anything else.
Hi there.
Could you please post here (or in a README file) what exact commands are you using to compile these binaries? That way it would be easier for us to send pull-requests with updated files for you to consider.
In my particular case, I'm deploying a project with this gem in Heroku and upgrading from cedar stack to cedar-14 is not possible because libjpeg62 is not there anymore. @anazar mentioned this issue too.
My approach to workaround this would be to compile a new binary called wkhtmltopdf_linux_amd64_jpeg8 and use that one if libjpeg8 is detected.
As mentioned above, right now the binaries are the compiled binaries from http://wkhtmltopdf.org
If you can compile them to include the necessary stuff and send a pull request, I'd be glad to merge it in.
Running apt-get install libjpeg-dev
on Ubuntu 14.04 64-bit worked in my case
Closing this now that we have sorted out the process of incorporating official wkhtmltopdf releases into this project.
Thanks everyone for your tips and suggestions!
noticing somethnig simmilar in ubuntu 18.04
IMGKit::CommandFailedError:
Command failed: /home/t/.rvm/gems/ruby-2.7.1@projectname/bin/wkhtmltoimage --height 0 --quality 50 --width 600 --format jpg - -: /home/t/.rvm/gems/ruby-2.7.1@projectname/gems/wkhtmltoimage-binary-0.12.5/libexec/wkhtmltoimage-amd64: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
using
wkhtmltoimage-binary (0.12.5)
imgkit (1.6.2)
ruby-2.7.1
rails 6.0.3.2
rvm 1.29
I've tried apt-get install libjpeg-dev
and didn't work
Ubuntu 14.04 64-bit
Ubuntu 14.04 32-bit
CentOS 7.0
CentOS 6.3 64-bit
CentOS 6.3 32-bit
Dependent libraries for 32-bit does not exist in the standard RPM repositories of CentOS.
I've tried creating a symlink, but it doesn't work:
Do you have a solution?