csquared/IMGKit

IMGKit::CommandFailedError - wkhtmltoimage-amd64: error while loading shared libraries: libjpeg.so.8

peterngyn opened this issue ยท 4 comments

Hello!

I'm running into this error when using IMGKIT with AWS elastic beanstalk.
Configuration: 64bit Amazon Linux 2014.09 v1.2.0 running Ruby 2.1

IMGKit::CommandFailedError (Command failed: /opt/rubies/ruby-2.1.4/bin/wkhtmltoimage --height 0 --quality 10 --format png - -: /opt/rubies/ruby-2.1.4/lib/ruby/gems/2.1.0/gems/wkhtmltoimage-binary-0.12.1/libexec/wkhtmltoimage-amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

Any ideas? I've tried installing the following packages through yum.

libjpeg-turbo-devel: []
libfontenc: []
libpng: []
libXfont: []
fontconfig: []

Thanks!

Note: If I specify gem 'wkhtmltoimage-binary', '~> 0.11.0.1.1' this issue doesn't occur.

I'm facing the same issue. Any updates?

Anyone get this working?

@jeremieweldin I don't remember exactly how I solved it, but here's my currently working setup:

#06-wkhtmlpreinstall.config
packages: 
  yum:
    xorg-x11-fonts-75dpi: []
    libpng: []
    xz: [] 
    urw-fonts: []
    libXext: []
    openssl-devel: []
    libXrender: []
    redhat-lsb: []

07-wkhtmlconfig.config

packages: 
  rpm:
    wkhtmltopdf: http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos5-amd64.rpm

Gemfile:

gem 'imgkit', github: 'ricardonacif/IMGKit'

+1 on Gentoo / ruby 2.2.5

Switching to 'wkhtmltoimage-binary', '~> 0.11.0.1.1' seems to fix the issue.