我无法安装支持自由字体 [Ubuntu] 的 php

I can not install php with freetype support [Ubuntu]

我正在尝试再次从源代码安装 php,我已经安装了好几次了。我真的需要 freetype 支持,当我尝试编译 php 除了 freetype 之外,一切都很好。

PHP 版本:8.0.1

Error: configure: WARNING: unrecognized options: --with-freetype-dir

终端命令:

sudo ./configure --prefix=/usr/local/php --with-mysqli=mysqlnd  --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg --with-zlib --with-kerberos --enable-gd   --with-freetype-dir=/usr/local/freetype2/ --with-freetype 

来自the manual

To enable support for FreeType 2 add --with-freetype-dir=DIR. As of PHP 7.4.0 use --with-freetype instead, which relies on pkg-config.