centos在php7.4版本安装gd扩展

发布时间:2020/04/27 作者:天马行空 阅读(3950)

1、进入下载的php安装包源码目录

cd /home/php-7.4.5/ext/gd

2、执行安装

/home/wwwroot/php/bin/phpize
./configure --with-php-config=/home/wwwroot/php/bin/php-config --with-freetype --with-jpeg --enable-gd  --enable-gd-jis-conv
make && make install

注意安装的时候加上--with-freetype,支持freetype


3、php.ini 中加入 extension=gd.so

/etc/init.d/php-fpm restart



安装gd库之前需要先安装freetype

yum install freetype-devel
关键字centos linux