读书人

装libpng报的两大异常的解决办法

发布时间: 2012-07-01 13:15:00 作者: rapoo

装libpng报的两大错误的解决方法

????? 在装PHP之前,可能我们需要一些库支持和处理,比如支持gd对缩略图的支持,或者freetype对特殊效果如水印的支持等,其中有一个库叫libpng,装libpng的时候难是不难,但会出现错误,下面就对几种错误说明一下解决办法。

?

首先说一下所有问题的前提解决办法:读INSTALL文件

?

1.报错:error: ZLib not installed

?

很明显是ZLib没安装,读INSTALL文件知道,两种问题要注意:

?

1) 安装libpng前要安装ZLib

2) ZLib和libpng的目录结构应该是同一级的:

?

???
装libpng报的两大异常的解决办法
?2.报错:

?

? There is no \"configure\" script in this distribution of
? libpng-1.2.8.

? Instead, please copy the appropriate makefile for your system from the
? \"scripts\" directory.? Read the INSTALL file for more details.

? Update, July 2004: you can get a "configure" based distribution
? from the libpng distribution sites.? Download the file
? libpng-1.2.8-config.tar.gz

?

? 这个是在装libpng的时候,要做的是 在scripts下面的makefile.linux文件拷贝到libpng根目录下重命名为makefile,然后用命令 ./configure --prefix=/usr/local/libpng ,可是打开configure文件后发现,里面啥指令都没有,只是打印出一些话,就是上面那段话,意思就是说,不用configure啦,直接make就好了

?

所以 我们直接make/make install就好了

读书人网 >开源软件

热点推荐