wkhtmltopdf-binary-edge
wkhtmltopdf-binary-edge copied to clipboard
wkhtmltopdf 12.5.0 - libjpeg.so.8 ... no such file or directory
After updating to the latest version of the gem, I'm getting the following error message whenever I try and use wkhtlmtopdf:
/usr/local/bundle/gems/wkhtmltopdf-binary-edge-0.12.5.0/libexec/wkhtmltopdf-linux-amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
Any idea what we can do to resolve this? Can't seem to manually install the dependency via apt-get
.
I got this error on Heroku after updating to the Heroku-18 Stack from the Heroku-16 stack. I tried solving it with the Apt buildpack (https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt) since it seems there has been a change in libpng
between stack versions (link here), but no luck. I had to downgrade our Heroku application to the Heroku-16 Stack for this error to go away.
Hmm, we're no Heroku on our project at all, this is just being bundled with gem 'wkhtmltopdf-binary-edge', '~> 0.12.4.0'
I have the same error. no solution yet
Have you changed or updated the system in any way? This was directly related to a missing dependency on the Ubuntu 16.04 server.
I guess the binaries are built on either wheezy or a fork of wheezy (ubuntu 14.04) , as newer versions have libjpeg.so.62.
Since most docker images now use stretch instead of wheezy as base, that will be the reason for it to not work on heroku, as newest stack is based on stretch.
See overview over the various versions here: https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=libjpeg
I get a similar error with libpng: Command Error: /app/vendor/bundle/ruby/2.5.0/gems/wkhtmltopdf-binary-edge-0.12.5.0/libexec/wkhtmltopdf-linux-amd64: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
what to do?
Either go with a stack that has libraries needed by the newest version of the gem, or use 0.12.4. (At least that works fine here).
Hi. This could be addressed by #16
I've had to downgrade to 0.12.40 on Stretch due to this issue.
I've had to downgrade to 0.12.40 on Stretch due to this issue.
Thanks, @jefmathiot! Same here.
I am too facing the same issue that unable to display images served over https
. I am finding difficulty to fix this issue.
-
Tried with 0.12.5.0 but this gives libjpeg.so.8 error. This gives below error:
-
Tried with 0.12.4. but this does not render https images.
-
Tried with 0.12.2.1, but this also does not render https images.
However, when I tried rendering blob image, it worked.
Using blob format is the least option I would like to opt since my pdf shall have lots of images. Looks like switching the version did charm for everyone. Any ideas why didn't it work for me?
Am I missing anything? Please advise.
@kavitakanojiya images work just fine here with 0.12.4, however, all images here are loaded as local file:// links instead of http/https. I opted for this, as I had issues with http/https images as well.
Hey Folks sorry for the super delayed response.
This repo just provides the binaries needed for development. If you need to run this on heroku, please use https://github.com/rposborne/wkhtmltopdf-heroku instead.
There are currently some issues with wkhtmltopdf 0.12.5 on Ubuntu 18 - please use 0.12.4 or 0.12.3 (which I am currently using) instead.
If you have any issues with wkhtmltopdf itself, please open a ticket here https://github.com/wkhtmltopdf/wkhtmltopdf
Thanks!
@kavitakanojiya did you solved this issue with images served over https
?
I am too facing the same issue that unable to display images served over
https
. I am finding difficulty to fix this issue.
- Tried with 0.12.5.0 but this gives libjpeg.so.8 error. This gives below error:
![]()
- Tried with 0.12.4. but this does not render https images.
- Tried with 0.12.2.1, but this also does not render https images.
However, when I tried rendering blob image, it worked.
Using blob format is the least option I would like to opt since my pdf shall have lots of images. Looks like switching the version did charm for everyone. Any ideas why didn't it work for me?
Am I missing anything? Please advise.
If it helps, I tried a bunch of different options and only got the images to render using both of these gems:
gem 'wkhtmltopdf-binary-edge', '~> 0.12.2.1'
gem 'wkhtmltopdf-heroku', '2.12.5.0'
Hi @LizBayardelle - I don’t think that’s a valid fix. The two gems basically are doing the same thing (with different versions of wkhtmltopdf) except the 2nd gem only works under Ubuntu 18.
What is the OS you are using? (For dev and production) And which gem you are using for creating PDFs
Hello Guys! We have any update about that?
Hi there - if you are using Ubuntu 18 - please use the wkhtmltopdf-heroku gem instead.
Otherwise you may install the missing dependency with this
download the package to the /tmp
folder:
wget -q -O /tmp/libpng12.deb http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
install it with dpkg
dpkg -i /tmp/libpng12.deb
remove the deb
file from the /tmp
folder:
rm /tmp/libpng12.deb
this worked for me in Ubuntu 18.04.
I've had to downgrade to 0.12.40 on Stretch due to this issue.
This worked for me ! :)
For anyone who still faced this issue, You can try with downgrade the version to 0.12.4
find wkhtmltopdf-binary-edge OR wkhtmltopdf-binary (inside gemfile.lock), then change to this:
wkhtmltopdf-binary (0.12.4)
then run 'bundle install' in your terminal
thanks to @jefmathiot
This error also appears if you have not installed wkhtmltopdf
sudo apt-get install zlib1g fontconfig libxrender1 libfreetype6 libxext6 libx11-6
sudo apt-get install wkhtmltopdf