在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/
安装成功,图片操作正常!

相关文章:

  • 2021-10-15
  • 2021-05-30
  • 2022-12-23
  • 2021-05-28
  • 2021-05-18
  • 2021-10-14
  • 2022-03-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2021-09-14
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案