• 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/'

  • 相关阅读:
    linux 运维
    mariadb replication
    phpmyadmin
    Objective-C设计模式——单例Singleton(对象创建)
    收藏iOS学习资料
    axios拦截器
    vue单页面优化
    html设置http缓存代码
    js数组去重,排序的几种方法
    前端移动端问题
  • 原文地址:https://www.cnblogs.com/mazefeng/p/3359812.html
Copyright © 2020-2023  润新知