error: expected declaration specifiers or ‘...’ before ‘FILE’

简介:


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

本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/836892如需转载请自行联系原作者


yangzhimingg

相关文章
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
|
5月前
|
安全
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yo
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yo
|
7月前
|
Unix Linux Shell
syntax error: unexpected end of file
syntax error: unexpected end of file
36 0
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
133 0
|
7月前
|
开发工具
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
228 0
|
7月前
|
Python
完美解决丨File “invalid.py“, line 1 print(`Hello World!`) ^ SyntaxError: invalid syntax
完美解决丨File “invalid.py“, line 1 print(`Hello World!`) ^ SyntaxError: invalid syntax
Newline required at end of file but not found.
Newline required at end of file but not found.
199 0
Newline required at end of file but not found.
|
Linux
error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
114 0
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
147 0
error: ‘PRIO_PROCESS’ undeclared
error: ‘PRIO_PROCESS’ undeclared
102 0