freetype

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


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.


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: