When I am trying to build matplotlib-1.3.1, I am getting the below freetype header errors. Probably it is not finding the ftheader.h. Any idea on how to solve this problem?
Once installed (properly) the development package, the Freetype headers shall be in $(includedir)/freetype/freetype2
and $(includedir)/freetype2/freetype/config
, with the only exception of ft2build.h
which is in $(includedir)
.
It seems from the message you showed that indeed there is a ft2build.h
file in /usr/include
(a natural place for $(includedir)
), yet the rest of the headers are not at the correct place.
I do not know exactly how to correct this since it is probably an issue with your particular distribution and the way you installed it, but I feel the most natural fix is to uninstall (properly) the freetype-dev[el]
package, then re-install it, using of course the distribution-provided version which matches your installed .so, apparently 2.3.11.
Installing Freetype 2.5.0.1 will not help you until you successfully build the library, then install it in your system successfully; only then you will have the headers installed in $(includedir)
and its sub-directories.
For Mac OS 10.6.8
sudo ln -s /usr/X11/include/freetype2/freetype /usr/X11/include/.
Seems to do the trick... If you look at the /usr/X11/include/ft2build.h it seems as though it is really a problem with that header file and the way free type is installed, not a matplotlib problem.
For RHEL use below command :
yum install freetype-devel -y
For Ubuntu use below command:
apt-get install libfreetype-dev -y