zlib-1.2.7/libpng-1.5.9 instead of zlib-1.2.8/libpng-1.6.6
The reason for the failure apparently appears to be version incompatibility, partly may be due to libpng-1.6.6 being unstable and has conflict with the zlib-1.2.8 being previously installed.
I uninstalled zlib-1.2.8 and reinstalled the older but stable release zlib-1.2.7 and instead of libpng-1.6.6, downloaded and installed libpng-1.5.9 and libpng installation passed the test successfully!
There was no zlib_reset - 'inflateReset2' problem this time. Don't know if there was a better solution, but I seemed to have bypassed the problem anyway. So the ideal compatible versions are zlib-1.2.7/libpng-1.5.9 instead of zlib-1.2.8/libpng-1.6.6 which I had been trying! Hope this helps.
1、
wget "http://download.savannah.gnu.org/releases/freetype/freetype-2.4.0.tar.bz2"
tar jxvf freetype-2.4.0.tar.bz2
cd freetype-2.4.0
./configure --prefix=/usr/local/freetype && make && make install
2、
wget "http://www.ijg.org/files/jpegsrc.v9.tar.gz"
tar zxvf jpegsrc.v9.tar.gz
cd jpeg-9
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/jpeg && make && make install
mkdir -p /usr/local/jpeg/include
mkdir -p /usr/local/jpeg/lib
mkdir -p /usr/local/jpeg/bin
mkdir -p /usr/local/jpeg/man/man1
3、
wget "http://downloads.sourceforge.net/project/libpng/libpng12/1.2.50/libpng-1.2.50.tar.gz?r=http%3A%2F%2Fwww.libpng.org%2Fpub%2Fpng%2Flibpng.html&ts=1376631135&use_mirror=nchc"
tar zxvf libpng-1.2.50.tar.gz
cd libpng-1.2.50
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/libpng && make && make install
./configure --with-php-configure=/usr/local/php/bin/php-config --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype
或者
./configure --with-php-config=/usr/local/php/bin/php-config --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype
make && make install
1. freetype
2 |
tar jxvf freetype-2.4.0.tar.bz2 |
3 |
cd freetype-2.4.0 |
4 |
./configure --prefix=/usr/local/freetype && make && make install |
2. jpegsrc
2 |
tar zxvf jpegsrc.v9.tar.gz |
3 |
cd jpeg-9 |
4 |
CFLAGS= "-O3 -fPIC" ./configure --prefix=/usr/local/jpeg && make && make install |
5 |
mkdir -p /usr/local/jpeg/include |
6 |
mkdir -p /usr/local/jpeg/lib |
7 |
mkdir -p /usr/local/jpeg/bin |
8 |
mkdir -p /usr/local/jpeg/man/man1 |
3. libpng
2 |
tar zxvf libpng-1.2.50.tar.gz |
3 |
cd libpng-1.2.50 |
4 |
CFLAGS= "-O3 -fPIC" ./configure --prefix=/usr/local/libpng && make && make install |
接下来需要cd到php源码的 gd 目录,否则会报 cannot find config.m4 之类的错误。
1 |
cd php-5.3.6 |
2 |
cd ext |
3 |
cd gd |
然后再这个目录执行命令 /usr/local/php/bin/phpize。什么时候需要用到 phpize 呢?当我们需要再加些模块,又不想重新编译php,这些我们就可以用phpize了。我的PHP安装在 /usr/local/php/ 这个目录里,可以根据个人情况修改。
1 |
/usr/local/php/bin/phpize |
现在可以进行单独编译安装了:
1 |
./configure --with-php-configure=/usr/local/php/bin/php-config --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype |
2 |
或者 |
3 |
./configure --with-php-config=/usr/local/php/bin/php-config --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype |
4 |
make && make install |
接着修改php.ini文件 在 ;extension=php_zip.dll 下面添加一行 extension=gd.so
重启 Nginx 之后再看看是否安装成功了。再执行 /usr/local/php/bin/php -m 查看gd模块是否加载成功。
1 |
service nginx restart |
2 |
/usr/local/php/bin/php -m |
console列出:
01 |
[root@nowamagic gd]# /usr/local/php/bin/php -m |
02 |
[PHP Modules] |
03 |
Core |
04 |
ctype |
05 |
date |
06 |
dom |
07 |
ereg |
08 |
fileinfo |
09 |
filter |
10 |
gd |
11 |
…… |
zlib-1.2.7/libpng-1.5.9 instead of zlib-1.2.8/libpng-1.6.6的更多相关文章
- linux x64下编译libjpeg,libpng,zlib
libJpeg编译: 下载libjpeg源码:http://www.ijg.org/,下载jpegsrc.v9a.tar.gz 解压源码,命令:tar -zxvf jpegsrc.v9a,源码文件夹为 ...
- libpng使用
自己的实现 unsigned int component(png_const_bytep row, png_uint_32 x, unsigned int c, unsigned int bit_de ...
- Visual Studio 2015 下 编译 libpng
libpng https://github.com/glennrp/libpng zlib https://github.com/madler/zlib/releases https://github ...
- ZLIB 库
zlib 编辑 zlib是提供数据压缩用的函式库,由Jean-loup Gailly与Mark Adler所开发,初版0.9版在1995年5月1日发表.zlib使用DEFLATE算法,最初是为libp ...
- VC++编译libpng
目录 第1章简介 1 第2章 Visual C++6.0 2 2.1 打开项目 2 2.2 编译宏 3 2.2.1 小结 5 第3章 Visual C++2010 ...
- libpng处理png图片(一)
一:libpng库的编译 环境:windows10 + VS2013 需要下载:libpng, zlib两个库 下载地址: libpng:http://libmng.com/pub/png/libpn ...
- VC6 下 libpng 库的编译与初步使用
VC6 下 libpng 库的编译与初步使用 目录 libong 库的介绍 VC6 下 libpng 的编译 下载 libpng 与 zlib 进行编译 得到 .lib 文件 初步使用 对 VC6 ...
- 安装libpng库
一. 安装libpng库前需要先安装zlib库,libpng库依赖zlib库 1.1. zlib库安装 1.1.1. 下载地址:http://www.zlib.net/ 1.1.2. 解压后得到zli ...
- 在Windows上编译最新的CURL,含有zlib,openssl
最近,从网上下载了一个curl库,使用时各种报错,都无法启动,于是干脆就直接自己编译了. 1. 准备工作 a. 下载zlib zlib可以使得HTTP请求支持gzip压缩,其地址如下: 官网:http ...
- [充电][库]Zlib文件压缩和解压
原文链接: http://www.cnblogs.com/fairycao/archive/2009/12/09/1620414.html 开源代码:http://www.zlib.net/zlib使 ...
随机推荐
- Angular的自定义指令以及实例
本文章已收录于: AngularJS知识库 分类: javascript(55) http://www.cnblogs.com/xiaoxie53/p/5058198.html 前面的文章介 ...
- jQuery实现DOM加载方法源码分析
传统的判断dom加载的方法 使用 dom0级 onload事件来进行触发所有浏览器都支持在最初是很流行的写法 我们都熟悉这种写法: window.onload=function(){ ... } 但 ...
- Android自定义ViewGroup
视图分类就两类,View和ViewGroup.ViewGroup是View的子类,ViewGroup可以包含所有的View(包括ViewGroup),View只能自我描绘,不能包含其他View. 然而 ...
- ubuntu自动执行
一般先写个sh脚本文件---->要执行的语句写入sh文件----->chromd -x ???.sh增加权限即可 crontab -e * * * * * /home/???.sh */1 ...
- Java 性能分析工具 , 第 3 部分: Java Mission Control
引言 本文为 Java 性能分析工具系列文章第三篇,这里将介绍如何使用 Java 任务控制器 Java Mission Control 深入分析 Java 应用程序的性能,为程序开发人员在使用 Jav ...
- [MySQL Reference Manual] 23 Performance Schema结构
23 MySQL Performance Schema 23 MySQL Performance Schema 23.1 性能框架快速启动 23.2 性能框架配置 23.2.1 性能框架编译时配置 2 ...
- 运行Maven工程总是报错:No goals have been specified for this build
Error info: No goals have been specified for this build. You must specify a valid lifecycle phase or ...
- PL/SQL配置Oracle数据库路径
打开PL/SQL-Tools->Preferences-Orcacle->Connecttion 找到配置路径,打开-product\instantclient_11_2\NETWORK\ ...
- jsp中的@include与jsp:include区别详解
1 前言 搞java开发的人也许都知道在jsp中引入项目中其他文件有如下两种方式 <%@include file="xxx.jsp"%> <jsp:include ...
- codevs 1164 统计数字
时间限制: 1 s 空间限制: 128000 KB 题目等级 : 白银 Silver 题目描述 Description [问题描述]某次科研调查时得到了n个自然数,每个数均不超过150000000 ...