./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-inline-optimization --enable-fpm --enable-soap --enable-pcntl --enable-xml --with-libxml-dir --with-xmlrpc --with-openssl --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-freetype-dir --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --with-libmbfl --with-onig--enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-opcache --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support
搜索找到以下的说法:
这是由于在 Ubuntu 19.04 中 apt-get 安装的 libfreetype6-dev 版本为 2.9.1-3

http://changelogs.ubuntu.com/changelogs/pool/main/f/freetype/freetype_2.9.1-3/changelog
在 changelog 中写到:
The `freetype-config' script is no longer installed by default
(Closes: #871470, #886461). All packages depending on libfreetype6-dev
should use pkg-config to find the relevant CFLAGS and libraries.
freetype-config 被替代成 pkg-config ,新版本利用 pkg-config 管理 CFLAGS 和 库
办理方法一样平常都是apt install freetype 之类的,但实在没有用,由于freetype2.10版本已经没有 freetype-config文件。
在考试测验改为pkg-config 编译后,正常通过了,但zabbix页面的图形和图片显示就会有问题......,一贯打圈圈或者图片非常。
而PHP在 7.4 版本后才修复好这个问题,但没有测试过7.4的兼容性,以是换个思路,利用编译办法安装freetype-2.8版本,然后指定目录编译即可。
下载链接
https://download.savannah.gnu.org/releases/freetype/freetype-2.8.tar.gz
创建安装目录
mkdir /usr/local/freetype
tar -zxf freetype-2.8.tar.gz
cd freetype-2.8
./configure --prefix=/usr/local/freetype && make && make install
安装完成后,修正freetype的参数加上安装目录,再重新编译安装php即可
--with-freetype-dir=/usr/local/freetype
查看php加载的模块
php -m