Building ‘_imagingft’ extension error command ‘cc’ failed with exit status 1


This error is due to freetype header missing.

_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found
#include <freetype/fterrors.h>
1 error generated.
error: command 'cc' failed with exit status 1

 First, verify freetype is installed. With brew:

brew install freetype

If freetype installed, warning message shows:

Warning: freetype-2.5.5 already installed

Next to fixed the issue, is create a symlink for freetype2.
Instead of symlinking to a specific version of freetype2, do this:

ln -s /usr/local/include/freetype2 /usr/local/include/freetype

This saves you the trouble of recreating the symlink whenever you upgrade freetype2.

By Keenlio, November 3, 2015

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

seven × 9 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>