CentOS5.6上GD库支持freetype的问题
时间:2016-04-03 21:18 来源:linux.it.net.cn 作者:IT
不知是我的系统问题还是CentOS本来就存在这个问题,通过yum install gd gd-devel 安装的GD库不支持freetype, 即使在编译PHP时添加–with-freetype-dir=/usr/lib也没有用。
最后只有将通过yum安装的gd清除(这一步很重要),重新编译gd:
./configure --prefix=/usr/local/gd\
--with-jpeg=/usr/lib\
--with-png=/usr/lib\
--with-xpm=/usr/lib\
--with-freetype=/usr/lib\
--with-fontconfig=/usr/lib\
重新编译PHP:
./configure --enable-fpm\
--with-openssl\
--with-zlib\
--enable-calendar\
--with-curl\
--with-curlwrappers\
--enable-ftp\
--enable-mbstring\
--with-mysql=mysqlnd\
--with-mysqli=mysqlnd\
--with-pdo-mysql=mysqlnd\
--enable-pcntl\
--enable-sockets\
--enable-zip\
--enable-soap\
--with-fpm-user=www\
--with-fpm-group=www\
--with-mcrypt=/usr/lib64\
--prefix=/usr/local/php\
--with-jpeg-dir=/usr/lib\
--with-png-dir=/usr/lib\
--with-freetype-dir=/usr/lib\
--with-gd=/usr/local/gd2\
--with-gettext
终于在phpinfo()里面看到FreeType Support了。
(责任编辑:IT)
不知是我的系统问题还是CentOS本来就存在这个问题,通过yum install gd gd-devel 安装的GD库不支持freetype, 即使在编译PHP时添加–with-freetype-dir=/usr/lib也没有用。 最后只有将通过yum安装的gd清除(这一步很重要),重新编译gd:
重新编译PHP:
终于在phpinfo()里面看到FreeType Support了。 (责任编辑:IT) |