gm convert: FreeType library is not available (/usr/local/share/ghostscript/fonts/n019003l.pfb)

StackOverflow https://stackoverflow.com/questions/20593888

  •  02-09-2022
  •  | 
  •  

Question

It's on OS X 10.9. I installed GraphicsMagick with brew, and FreeType v2.5.2. But when I use gm convert in my program, I got this error:

{ [Error: Command failed: gm convert: FreeType library is not available (/usr/local/share/ghostscript/fonts/n019003l.pfb).
] code: 1, signal: null }

My FreeType:

flyn:Font ijse$ freetype-config --libs
-L/usr/local/Cellar/freetype/2.5.2/lib -lfreetype -lz -lbz2 -lpng15

I've been searched on google for a while but got no answer.

Was it helpful?

Solution

You have to investigate a bit more:

1) Which binary is producing that error? Say it's gm. Please post output of

ldd `which gm`

to see if the library is linked directly.

2) if yes, try to add your path to LD_LIBRARY_PATH variable. Look if your path is there (here is how to do it: How to print the ld(linker) search path)

3) if no, have look in the configuration files

EDIT: Run freetype-config --libs. The path behind -L is the real location of the library. Is it anywhere in the output of the following command?

ldconfig -v 2>/dev/null | grep -v ^$'\t'

This command shows where the libraries are looked for. Is the location of your freetype library there? If yes, it is OK. If no, this is the cause of your problem! Try one of these:

  • make symlinks from one of those directories to your library
  • set export LD_LIBRARY_PATH=/location/of/your/freetype/libraries in the script that run the program that issues the above error.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top