CentOS matplotlib freetype png

服务器上用virtualenv部署安装matplotlib,始终无法安装,错误日志如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
freetype: no  [The C/C++ header for freetype2 (ft2build.h)

could not be found. You may need to install the

development package.]

png: no [pkg-config information for 'libpng' could not

be found.]

qhull: yes [pkg-config information for 'qhull' could not be

found. Using local copy.]

安装缺失依赖:

1
sudo yum install freetype

之后重新安装还是不行,彻底解决方案为:

1
sudo yum -y install freetype freetype-devel libpng-devel