Ruby on rails 4 在rails 4的centos服务器上使用imagekit和wkhtmltoimage从html创建图像时出错

Ruby on rails 4 在rails 4的centos服务器上使用imagekit和wkhtmltoimage从html创建图像时出错,ruby-on-rails-4,centos6,libjpeg,imagekit,wkhtmltoimage,Ruby On Rails 4,Centos6,Libjpeg,Imagekit,Wkhtmltoimage,我正在使用imagekit和wkhtmltoimage将html转换为图像。在我的本地服务器上,我使用的是ubuntu 14.10,运行良好。但live server是centos 6,当我将代码移动到live server时,它会显示以下libjpeg错误: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory 完整错误代码:

我正在使用imagekit和wkhtmltoimage将html转换为图像。在我的本地服务器上,我使用的是ubuntu 14.10,运行良好。但live server是centos 6,当我将代码移动到live server时,它会显示以下libjpeg错误:

error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
完整错误代码:

Command failed: /root/.rbenv/versions/2.1.2/bin/wkhtmltoimage --height 470 --width 350 --transparent --quality 60 --format png - -: /root/.rbenv/versions/2.1.2/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
以下是我在控制器中创建图像的代码:

html_content = "<div style='margin:-8px -2px 15px -8px;background:none repeat scroll 0 0 #{temp_params['color']}; direction: #{temp_params['direction']}; font-size: 22px;color: #fff;font-family:arial;line-height: 30px;padding: 15px; height: 470px;width:350px;border-radius: 4px;position:relative;text-align:center;display:table;'><div style='display:table-cell;vertical-align:middle;word-break:break-all;'>#{temp_params['text']}</div></div>"

        file = Tempfile.new(["quote", '.png'], 'tmp', :encoding => 'ascii-8bit')

        img = IMGKit.new(html_content, height: 470, width: 350, transparent: true, quality:60, :layout => false) 

        file.write(img.to_img(:png))

        temp.attachment = file

        file.unlink

        temp.save
html_content=“#{temp_参数['text']}”
file=Tempfile.new([“quote”,“.png”],“tmp”,:encoding=>“ascii-8bit”)
img=IMGKit.new(html_内容,高度:470,宽度:350,透明:true,质量:60,:布局=>false)
file.write(img.to_img(:png))
temp.attachment=文件
file.unlink
临时保存

我检查了各个链接上提供的解决方案,但没有一个有效。

您是否在服务器上安装了imagemagic或rmagic?感谢您的回复。我试过运行yum安装ImageMagick-ImageMagick-devel,它说已经安装了最新版本。