ImageMagick: Error while running convert: convert: unable to read font

ImagemagickOsx Mountain-Lion

Imagemagick Problem Overview


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.

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?

Imagemagick Solutions


Solution 1 - Imagemagick

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

$ brew install ghostscript

Solution 2 - Imagemagick

if you are using Ubuntu or in a docker with Ubuntu remove and reinstall ghostscript package will fix your issue

apt remove ghostscript
apt install ghostscript

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAgisView Question on Stackoverflow
Solution 1 - ImagemagickcfedukeView Answer on Stackoverflow
Solution 2 - ImagemagickAnish VargheseView Answer on Stackoverflow