【问题标题】:Heroku + MiniMagick + ImageMagick error loading librariesHeroku + MiniMagick + ImageMagick 错误加载库
【发布时间】:2019-04-18 21:21:19
【问题描述】:

我在 Heroku 上使用 RoR 应用程序。

我正在使用carrierwave 和mini_magick (imagemagick)。

在我的本地服务器上一切正常。

在 heroku 上出现以下错误:

Icon Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: `identify /tmp/mini_magick20181115-4-12nnpxw.png` failed with error: identify: error while loading shared libraries: libdjvulibre.so.21: cannot open shared object file: No such file or directory

似乎 libdjvulibre.so.21 不存在。我已经为 imagemagick 添加了 buildpack:https://github.com/ello/heroku-buildpack-imagemagick

有什么建议吗?

【问题讨论】:

  • 失败的命令是什么?如果您在 mini-magick 中调用 convert,那么您可能需要提供转换的完整路径。
  • 我在 heroku-18 堆栈上也遇到了这个问题,imagemagick 和 image-optim 构建包都使用carrierwave。我有多种使用以下指令的版本: process :resize_to_fit => [400, 400] process :convert => 'jpg' process optimize: [{ quality: 60 }]
  • devcenter.heroku.com/articles/stack-packages libdjvulibre-21 作为包安装在 heroku 堆栈上,但它仅在构建时可用,而不是运行时。
  • fmw42 - 失败的特定命令(在命令行中也是如此)是identify
  • 如果 mini-magics 使用 ImageMagick 7,则 "identify" 被替换为 "magick identify" 并且 "convert" 被替换为 "magick"

标签: heroku imagemagick minimagick


【解决方案1】:

好的,所以在联系了支持人员(“我们不处理第三方构建包”)和一些朋友的大量帮助之后,解决方案非常简单(在 heroku-18 堆栈上):

删除构建包。

除非您需要与随附版本 (https://devcenter.heroku.com/articles/stack-packages) 不同的版本,即 8:6.9.7.4​+dfsg-16​ubuntu6.4,否则只需移除包即可。这在我的暂存环境中对我有用。

【讨论】:

    猜你喜欢
    • 2017-11-12
    • 2018-07-10
    • 2017-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多