zoukankan      html  css  js  c++  java
  • php添加FreeType 库支持

    >刚编译了一个lamp,上线后发现验证码无法显示, 和网站沟通后,说是imagettftext()。 
    函数同时需要 GD 库和 FreeType 库。 通过产查看phpinfo();后发现没有freetype的支持, 
    下面是添加freetype支持的方法

    cd /usr/src/php.5.4.4

    cat config.nice      -->这个是你上次成功编译的参数

    我的系统是centos6.2 X86_64的  freetype的位置在    /usr/include/freetype2/freetype/

    不知道的同学, 可以通过find / -name freetype* 进行查找,

    之后在编译配置的参数上添加上   --with-freetype-dir=/usr/include/freetype2/freetype/ 就ok了

    另外贴一下我的配置参数

    './configure'
    '--prefix=/usr/local/php'
    '--enable-mbstring'
    '--with-apxs2=/usr/local/apache/bin/apxs'
    '--with-mysql=/usr/local/mysql'
    '--with-config-file-path=/usr/local/php'
    '--enable-session'
    '--with-bz2'
    '--with-gd'
    '--enable-sockets'
    '--with-freetype-dir=/usr/include/freetype2/freetype/'

  • 相关阅读:
    nginx基础系列
    常用MS-SQL写法整理
    Spring Bean装配方式
    sql获取该周的开始结束日期
    Docker基础入门实践
    vim常规操作
    基于CentOS的SSHD服务的Docker镜像
    RedisClient For .Net
    Redis数据类型及使用场景
    CentOS下安装Redis
  • 原文地址:https://www.cnblogs.com/mazefeng/p/3359812.html
Copyright © 2011-2022 走看看