安装GD时的错误 make[2]: *** [gd_png.lo] Error 1

安装GD时的错误 gd_png.c:791: syntax error before “for” gd_png.c:793: warning: parameter names (without types) in function declaration gd_png.c:793: warning: data definition has no type or storage class gd_png.c:794: syntax error before ‘}’ token

gd_png.c:798: warning: parameter names (without types) in function declaration gd_png.c:798: warning: data definition has no type or storage class gd_png.c:799: syntax error before ‘}’ token gd_png.c:802: syntax error before ‘&’ token gd_png.c:802: warning: data definition has no type or storage class gd_png.c:404: storage size of open' isn't known [color=Red]make[2]: *** [gd_png.lo] Error 1 make[2]: Leaving directory/tmp/gd-2.0.26gif’ make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/gd-2.0.26gif’ make: *** [all] Error 2

解决方法

vi gd_png.c 找到“png.h”改成“/usr/local/libpng/include/png.h”