This is an old revision of the document!
How to Compile GD PHP Extension
Sometimes the lsphp-gd package is not up-to-date.
This is guide for how to manually compile GD extension
yum install -y lsphp72-devel gcc libjpeg-turbo-devel libpng-devel libXpm-devel freetype-devel libwebp-devel wget https://www.php.net/distributions/php-7.2.24.tar.gz tar xzvf php-7.2.24.tar.gz cd php-7.2.24 cd ext cd gd /usr/local/lsws/lsphp72/bin/phpize /usr/local/lsws/lsphp72/bin/php-config ./configure --with-php-config=/usr/local/lsws/lsphp72/bin/php-config --with-webp-dir=/usr/include/webp --with-freetype-dir=/usr/include/freetype2/freetype --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-xpm-dir=/usr/include make make install pkill lsphp