linux php install the gd extension

Warmly recommended: Super Multi IT resources, all in 798 Resource Network

(1, yum install all of the necessary libraries)
yum -Y-devel libjpeglibjpeg the install the libpng FreeType FreeType the libpng-devel-devel

(2, extend and to open the gd Source Package php)
# configure file
/ usr / local / php / bin / the phpize
# precompiled
./configure --with-png-dir --with- freetype-dir --with -jpeg-dir --with-gd --with- php-config = / usr / local / php / bin / php-config

[If] reported the following error
configure: error:. Jpeglib.h not found
[solution]
yum list installed | grep libjpeg # see if there is [shown below] installed libjpeg
libjpeg-turbo.x86_64 1.2.1-3.el6_5 @base
Turbo-devel.x86_64-libjpeg
// to has two, there is no second use: yum -y install libjpeg-devel mounted
// rpm -ql libjpeg-turbo-devel.x86_64 # view is not generated corresponding jpeglib .h files
[Note] # and then re-precompiled

#安装
make && make install

(3、修改 php.ini)
extension_dir="/usr/local/php/lib/php/extensions/no-debug-zts-20121212/"
extension=gd.so

Guess you like

Origin blog.csdn.net/xianhenyuan/article/details/92795068