error: expected declaration specifiers or ‘...’ before ‘FILE’ In file included from /sever/php/php-5.3.6/ext/gd/libgd/gd_compat.c:8: /usr/local/jpeg8//include/jpeglib.h:954: error: expected declaration specifiers or ‘...’ before
‘FILE’
/usr/local/jpeg8//include/jpeglib.h:955: error: expected declaration specifiers or ‘...’ before‘FILE’
make: *** [ext/gd/libgd/gd_compat.lo] Error 1
这个问题应该是 库 文件路径问题 1.安装gd之前,修改gd源码包目录下的gd_png.c
gd_png.c
进入该文件,找到#include "png.h"改成 #include "/usr/local/libpng/include/png.h"【根据自己安装libpng的目录修改】
然后在 ./configure .......安装gd。
2.安装php之前,修改php源码包下的gd_compat.c
路径:【/php-5.3.6/ext/gd/libgd】
【根据自己安装libpng的目录修改】
include </usr/local/libpng/include/png.h>
然后再./configure .......安装php