当前位置:   article > 正文

php 安装freetype,php教程博客 » 安装freetype使php的gd库支持freetype

php freetype

1、安装freetype

yum install yum install freetype freetype-devel

2、重新编译php使其gd库支持freetype

原来编译php成功的参数

[root@localhost php-5.2.17]# cat ./config.nice

#! /bin/sh

#

# Created by configure

'./configure' \

'--prefix=/usr/local/php' \

'--enable-fastcgi' \

'--enable-fpm' \

'--enable-force-cgi-redirect' \

'--with-curl' \

'--with-gd' \

'--enable-mbstring' \

'--with-mysql' \

'--with-mysqli' \

'--enable-gd-native-ttf' \

'--enable-sockets' \

'--with-jpeg-dir' \

'--with-png-dir' \

"$@"

重新编译

注:切忌编译前关闭nginx 和php

编译代码如下

./configure --prefix=/usr/local/php --enable-fastcgi --enable-fpm  --enable-force-cgi-redirect --with-curl --with-gd --enable-mbstring --with-mysql --with-mysqli  --enable-gd-native-ttf --enable-

sockets --with-jpeg-dir --with-png-dir --with-freetype-dir

make

make test

make install

重新启动php nginx

这个是我操作流程 success

1011  yum install freetype freetype-devel

1012* ./configure --prefix=/usr/local/php --enable-fastcgi --enable-fpm  --enable-force-cgi-redirect --with-curl --with-gd --enable-mbstring --with-mysql --with-mysqli  --enable-gd-native-ttf --enable-sockets --with-jpeg-dir --with-png-dir -

1013  make

1014  make test

1015  make install

1016  /usr/local/php/sbin/php-fpm restart

1017  /etc/init.d/nginx restart

1018  cd /usr/

1019  ls

1020  cd libexec/

1021  ls

1022  cd ..

1023  locate libfreetype.so

1024  find / libfreetype.so

1025  /etc/init.d/nginx stop

1026  /usr/local/php/sbin/php-fpm stop

1027  cd /home/soft/php-5.2.17

1028  ls

1029  ./configure --prefix=/usr/local/php --enable-fastcgi --enable-fpm  --enable-force-cgi-redirect --with-curl --with-gd --enable-mbstring --with-mysql --with-mysqli  --enable-gd-native-ttf --enable-sockets --with-jpeg-dir --with-png-dir --with-freetype-dir

1030  make clean

1031  ls

1032  make clean

1033  make clear

1034  make clean

1035  make

1036  make install

1037  /usr/local/php/sbin/php-fpm start

1038  /etc/init.d/nginx start

1039  history

[root@localhost php-5.2.17]#

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/456287
推荐阅读
相关标签
  

闽ICP备14008679号