使用phpinfo()确认GD扩展库中是否有 freetype 项

1、Freetype 下载

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz

# 如果使用 wget 的时候提示 bash: wget: command not found ,使用 apt 安装 wget
apt install -y wget

2、解压 freetype

tar zxvf freetype-2.4.10.tar.gz
cd freetype-2.4.10

3、编译 freetype 源文件

./configure --prefix=/usr/local/freetype # 指定将软件安装在 /usr/local/freetype 目录下

make && make install

4、重新配置 GD 扩展库并进行安装

docker-php-ext-configure gd --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include

docker-php-ext-install gd

5、重启 docker容器

docker restart <容器ID>

相关文章:

  • 2021-05-17
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
  • 2021-10-07
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2022-02-01
  • 2022-01-06
相关资源
相似解决方案