centos php gd库,Centos安装GD库
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 php gd库,Centos安装GD库相关推荐
- linux编译blas,Linux系统CentOS 6.8上yum安装BLAS库
Linux系统CentOS 6.8上yum安装BLAS库 BLAS是一个广泛应用到科学计算软件上面的库文件,在CentOS的软件库中已经有该软件的软件包,我们可以直接使用yum来安装. 1.1.查询C ...
- linux卸载gd,linux下 安装GD
安? GD 前需要安? jpeg-6b, libpng, zlib, freetype.以下是下载网址: http://www.libgd.org/Downloads GD下载 ftp://ftp.u ...
- linux安装gd,linux下 安装GD
安裝 GD 前需要安裝 jpeg-6b, libpng, zlib, freetype.以下是下载网址: 1.安装zlib tar zxvf zlib-1.2.3.tar.gz cd zlib-1.2 ...
- 在CentOS 6.3 64bit上安装libunwind库
libunwind库为基于64位CPU和操作系统的程序提供了基本的堆栈辗转开解功能,32位操作系统不要安装.其中包括用于输出堆栈跟踪的API.用于以编程方式辗转开解堆栈的API以及支持C++异常处理机 ...
- 电脑python安装库_Python安装第三方库的3种方法 -电脑资料
这篇文章主要介绍了Python安装第三方库的3种方法,本文讲解了通过setuptools来安装python模块.通过pip来安装python模块.直接从网上下载下可执行文件来安装三种方法,需要的朋友可 ...
- python下载numpy库_安装numpy库
1.先安装pip: 下载地址:http://pypi.python.org/pypi/pip#downloads 下载pip-8.1.2.tar.gz(md5,pgp)完成之后,解压到一个文件夹,cm ...
- 手动安装Python库或安装第三方库的方法
http://www.jb51.net/article/86020.htm 源码安装 很多第三方库都是开源的,几乎都可以在github 或者 pypi上找到源码.找到源码格式大概都是 zip . ta ...
- PyCharm怎么安装第三方库? Pycharm安装python库的技巧
提示:PyCharm怎么安装第三方库?python中经常需要安装第三方库,安装的方法也有很多,今天我们就来看看使用Pycharm安装python库的技巧,详细请看下文 文章目录 前言 一.首先打开py ...
- php添加gd扩展,PHP7安装gd扩展的方法
PHP7安装gd扩展的方法 发布时间:2020-09-08 11:06:22 来源:亿速云 阅读:92 作者:小新 这篇文章将为大家详细讲解有关PHP7安装gd扩展的方法,小编觉得挺实用的,因此分享给 ...
- php7.1 phpize编译gd,centos 7 下用 phpize安装GD扩展库
yum 安装 开启GD库需要的模块 freetype ,jpegsrc,libpng 用phpize安装 查询php 开启模块 查询 phpize扩展安装 下载目录:/usr/src/freetype ...
最新文章
- 口罩巨头挑战“量子霸权”,3个月造出的『最强量子计算机』靠谱不?
- Linux进程top命令作用是,Linux中top命令起什么作用呢?
- pxe装机原理_linux PXE装机详解(非常详细,小白专用)
- 算法科普:有趣的霍夫曼编码
- C# 调用c++ 实例
- Embedding技术在推荐系统中的应用
- Spring Security OAuth2 授权失败(401)
- 23. Django进阶:Django发送邮件
- WOW、ScrollReveal:WOW.js和ScrollReveal.js基础学习
- 编译原理(第3版)第1章引论课后题答案
- Unity精品Demo收集
- Cocos Creator 实现大厅+子游戏模式
- PCS2021:VVC基于神经网络改进SAO
- 测试理论----软件测试四大测试过程
- 软件测试之黑盒、白盒的测试方法?
- android布局跑马灯,Android之跑马灯详解
- Premiere快捷键设置
- 从零开始自制实现WebServer(十九)---- 正式系统的学习一下Git 捣鼓捣鼓github以及一些其他的小组件
- 招商银行的“金融+知识”:知其然,更要知其所以然
- Error: Index .kibana belongs to a version of Kibana that cannot be automatically migrated. Reset it