tar zxvf ncurses-5.6.tar.gz 进入目录 cd ncurses-5.6
生成 makefile文件,
再进一步编译
./configure --prefix=/usr --with-shared --without-debug 编译,编译时间稍微长些,稍等
make
编译好最后就是安装了
make install
==================================
下面才开始安装 GD库,安装gd库成功与否,与下面的安装顺序有一定的关系 我们就一步步来演示安装, 下面所有用到的文件,可以到 http://www.tabcn.cn/download/gd_all.7z下载 把全部的文件 都放进 webserv 目录下
1: 安装zlib2 同样, 在Linux下使用 wget 来下载文件 tar zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --prefix=/usr/local/zlib make make install
---------------------------------
2:安装PNG
tar zxvf libpng-1.2.26.tar.gz cd libpng-1.2.26
cp scripts/makefile.linux ./makefile
./configure --prefix=/usr/local/libpng
make
make install
---------------------------------
3:安装ttf ( ttf 是字体的支持 )
tar zxvf freetype-2.3.5.tar.gz cd freetype-2.3.5
./configure --prefix=/usr/local/freetype
make
make install
---------------------------------
4:安装JPEG6
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
mkdir -pv /usr/local/libjpeg/{,bin,lib,include,man/man1,man1}
上面这个命令具体是实现这样的:
mkdir: created directory `/usr/local/libjpeg'
mkdir: created directory `/usr/local/libjpeg/bin'
mkdir: created directory `/usr/local/libjpeg/lib'
mkdir: created directory `/usr/local/libjpeg/include'
mkdir: created directory `/usr/local/libjpeg/man'
mkdir: created directory `/usr/local/libjpeg/man/man1'
mkdir: created directory `/usr/local/libjpeg/man1'
可以说是一个小小的bug吧,要我们手动建立这些目录,否则configure时候会说找不到目录。
./configure --prefix=/usr/local/libjpeg --enable-shared --enable-static
make
make install
---------------------------------
5:安装 libxml2
tar zxvf libxml2-2.6.31.tar.gz
cd libxml2-2.6.31
./configure --prefix=/usr/local/libxml2
make
这一步make 操作 时间相对也会比较长,呵呵
make install
cp xml2-config /usr/bin
---------------------------------
6:安装 libmcrypt-2.5.7.tar.gz
tar zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make
make install
---------------------------------
7:安装Fontconfig
tar -zxvf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
可以看到, 参数比较长, 我建议用记事本的朋友不要选择 自动换行。
看我操作, 自动换行 复制过去执行有时会出错。
去掉 自动换行
./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/freetype/bin/freetype-config
这里显示一个错误信息:
checking for LIBXML2... configure: error: Package requirements (libxml-2.0 >= 2.6) were not met: No package 'libxml-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBXML2_CFLAGS and LIBXML2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
但是我们在上面其实已经安装上 libxml2 了的,这里只是一个 环境变量没有设置好而已。
解决办法:
确定 /usr/local/libxml2/lib/pkgconfig 目录下有 libxml-2.0.pc
export PKG_CONFIG_PATH=/usr/local/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH
再次生成 makefile , 这样就成功了
./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/freetype/bin/freetype-config
好了吧,没有出现那个错误了。
make
make install
---------------------------------
8:安装GD库,
我们把这一步放在最后面
tar zxvf gd-2.0.35.tar.gz cd gd-2.0.35 ./configure --prefix=/usr/local/libgd --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype --with-jpeg=/usr/local/libjpeg --with-fontconfig=/usr/local/fontconfig
看到下面的信息, 呵呵 很多都显示支持了 Support for PNG library: yes Support for JPEG library: yes Support for Freetype 2.x library: yes Support for Fontconfig library: yes Support for Xpm library: no Support for pthreads: yes make make install 好了, 到这里为止 安装GD库全部过程演示完了。

Centos安装GD库的更多相关文章

  1. centos安装GD库失败

    Error: Package: php-gd-5.6.11-1.el6.remi.x86_64 (remi-php56) Requires: gd-last(x86-64) >= 2.1.1 E ...

  2. 烂泥:centos单独编译安装gd库

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 这几天一直在弄一个商城系统,该系统的源码及数据库都已经上传并创建完毕.但是在安装该系统时,却提示缺少gd库.如下: 使用php探针查看,发现php确实没 ...

  3. 【CentOS】php编译安装gd库

    一.准备工作 使用之前服务器按源码最小化安装完nginx.php-fpm,没有安装gd库,下面介绍下gd库的安装. gd库是一个开源的图像处理库,它通过提供一系列用来处理图片的API,使其可以用来创建 ...

  4. linux centos系统 php安装GD库扩展

    yum --enablerepo=remi-php56 install php-gd php-mysql php-mbstring php-xml php-mcrypt //安装GD库扩展 servi ...

  5. 安装GD库解决ThinkPHP 验证码Call to undefined function Think\imagecreate()出错

    在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会提示 ...

  6. CentOS 开启GD库

    在php.ini 中没有找到"extension=php_gd2.dll"这行代码,这是因为CentOS一般没有预装GD库. 解决办法: 1.在线安装GD库 yum -y inst ...

  7. PHP 编译安装 gd 库

    作者博文地址:https://www.cnblogs.com/liu-shuai/ 安装gd依赖库 freetype wget http://download.savannah.gnu.org/rel ...

  8. linux安装GD库

    首先我们检查GD库是否安装 php -i | grep -i --color gd 安装GD库 yum install php-gd* 安装完成之后配置php.ini文件 extension=gd.s ...

  9. php5.6.30环境报错Call to undefined function ImageCreate() 编译安装 gd库

    php5..30环境报错Call to undefined function ImageCreate() 编译安装 gd库 发现php5..30没有加载gd库 [root@cn_vs_web04:/u ...

随机推荐

  1. CentOS 添加硬盘创建并挂载分区

    分区工具介绍: fdisk 创建MBR分区:所支持的最大卷:2T,而且对分区有限制:最多4个主分区或3个主分区加一个扩展分区 gdisk 创建GPT分区:突破MBR 4个主分区限制,每个磁盘最多支持1 ...

  2. js 判断是不是数字||判断字符串是不是数字(正则表达式)

    js使用正则表达式判断对象是不是数字,或者字符串是不是数字,或者是不是数字类型 //判断是不是一个数字 或者 一个字符串里全是数字 isNumber (value) { if (value === u ...

  3. IDEA错误: 找不到或无法加载主类 com.xxx.freight.dofreight.doFreight解决办法

    1.右键点击工程,选择open Module Settings或点击File选择Project Structure,进入页面 2.选择Artifacts->JAR->From module ...

  4. WannaCry的UWP版,哈哈哈

  5. jQuery——复选框操作

    学习jQuer对表单.表格操作的过程中,按照书上的例子发现一个问题: <!DOCTYPE html> <html> <head> <title>复选框应 ...

  6. jQuery——超链接提示

    在熟悉jQuery过程中,练习超链接提示显示,发现书本上有个问题,经过查询资料,修改如下: <!DOCTYPE html> <html> <head> <ti ...

  7. JavaScriptDOM对象和jQuery对象的互相转换

    前言: 首先我们思考能不能直接在jQuery对象上调用原生DOM对象的方法或者直接在原生DOM对象调用jQuery对象呢?答案是否定的,我们看下把body背景色变为红色的代码: $("bod ...

  8. ls 显示目录下的内容和文件相关属性信息

    1.命令功能 ls命令是“list directory contents”,显示当前目录下的内容和文件属性. 2.语法格式 ls  [option]  file ls  选项  文件名 3.选项说明 ...

  9. VPS建站

    参考腾讯云的教程 选择了 LAMP的方案,即Linux + Apache + MySQL + Php 参考链接 https://cloud.tencent.com/edu/learning/cours ...

  10. vue 打包上线后 所使用的css3渐变属性丢失的问题解决方案

    最近在做vue项目的时候用到了css3渐变属性,本地跑项目没问题,但是打包放到服务器后发现这个属性丢失了.如下图: .join{ position:absolute; left:1rem; botto ...