【问题标题】:ImageMagick: Error while running convert: convert: unable to read fontImageMagick:运行转换时出错:转换:无法读取字体
【发布时间】:2012-12-05 20:28:33
【问题描述】:

我在 Mountain Lion 上并使用 Homebrew 安装了 ImageMagick(minimagick 也在我的 Gemfile 中,但我认为这无关紧要)。 SimpleCaptcha 在 Rails 应用程序中使用它来创建验证码。

但是,由于此错误,图像未创建:

Error while running convert: convert: unable to read font `/usr/local/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1123.
convert: Postscript delegate failed `/var/folders/gd/n7rzfhkd5jd0ws8jnzsz34hr0000gn/T/magick-vzHHz4ZP': No such file or directory @ error/ps.c/ReadPSImage/830.
convert: no images defined `/var/folders/gd/n7rzfhkd5jd0ws8jnzsz34hr0000gn/T/simple_captcha20121218-64930-1thtfpf.jpg' @ error/convert.c/ConvertImageCommand/3032.

有什么想法吗?

【问题讨论】:

    标签: imagemagick osx-mountain-lion


    【解决方案1】:

    如果您使用的是 Ubuntu 或在带有 Ubuntu 的 docker 中删除并重新安装 ghostscript 包将解决您的问题

    apt remove ghostscript
    apt install ghostscript

    【讨论】:

      【解决方案2】:

      您好像缺少ghostscript。如果您使用的是Homebrew,您可以通过以下方式安装它:

      $ brew install ghostscript
      

      【讨论】:

      • 有时你有 ghostscript 但它只是没有链接! $ brew unlink ghostscript && brew link ghostscript
      • 这也适用于错误消息未指定缺失字体的情况,如convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1153
      • 有人帮windows吗?
      猜你喜欢
      • 2019-01-23
      • 1970-01-01
      • 2017-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-15
      • 2016-02-25
      相关资源
      最近更新 更多