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.
FWIW I ran into this same issue on my Mac and solved it as follows:
brew uninstall graphicsmagick imagemagickfreetype was installed (brew info freetype)brew install imagemagickmagick -version to ensure you see freetype listed theregraphicsmagick formula via brew edit graphicsmagick to add the --with-freetype flag to the build flagsHOMEBREW_NO_INSTALL_FROM_API=1 brew install graphicsmagickgm -version and ensure it says "FreeType Yes"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:
export LD_LIBRARY_PATH=/location/of/your/freetype/libraries in the script that run the program that issues the above error.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With