安装编译gd时出错,排错一例

如果在编译的时候出现错误:gd_png.c:15:53: error: png.h: No such file or directory,解决如下:
# vi gd_png.c
# 找到行: #include “png.h” /* includes zlib.h and setjmp.h */
修改为: #include “/usr/local/libpng/include/png.h” /* includes zlib.h and setjmp.h */
编译make时,继续出错,zlib.h的,修改/usr/loca/libpng/include/png.h,搜索定位找到zlib.h,给出全路径,然后保存退出,继续gd的make,ok了

发表回复

您的电子邮箱地址不会被公开。