docker安装php的gd库

docker安装php的gd库

更新软件源

apt update 

安装依赖库

apt install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev 

解压源码

docker-php-source extract 

进入gd源码文件夹

cd /usr/src/php/ext/gd

准备编译

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

编译安装

docker-php-ext-install gd 

检查

php -m | grep gd
posted @ 2019-11-25 15:25  Scott_pb  阅读(1355)  评论(0编辑  收藏  举报