记录PHP7.4安装gd库的报错error: --with-freetype-dir --with-jpeg-dir

在Linux给PHP7.4安装gd库的时候,会报错error: --with-freetype-dir --with-jpeg-dir等等,
就算能安装过去,php -m有了gd扩展,实际网页中图片也不能使用imagecreatefromjpeg,
百度到的安装命令都是docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/类似的,
仔细查看PHP7.4的手册Other Changes才发现with参数改了
记录PHP7.4安装gd库的报错error: --with-freetype-dir --with-jpeg-dir
重新执行命令docker-php-ext-configure gd --with-webp=/usr/include/webp --with-jpeg=/usr/include --with-freetype=/usr/include/freetype2/
安装成功,图片操作正常!