ImageMagick:在运行convert: convert时发生错误:无法读取字体

时间:2021-07-19 08:59:50

I'm on Mountain Lion and installed ImageMagick using Homebrew (minimagick is also in my Gemfile but I don't think that's relevant). SimpleCaptcha uses it in a Rails app to create CAPTCHAs.

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

However, the image isn't created cause of this error:

但是,由于这个错误,图像没有被创建:

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.

Any ideas?

什么好主意吗?

1 个解决方案

#1


159  

Looks like you're missing ghostscript. If you are using Homebrew you can install it via:

看来你错过了鬼剧本。如果你正在使用Homebrew,你可以通过以下方式安装:

$ brew install ghostscript

#1


159  

Looks like you're missing ghostscript. If you are using Homebrew you can install it via:

看来你错过了鬼剧本。如果你正在使用Homebrew,你可以通过以下方式安装:

$ brew install ghostscript