升级系统,把php5.2.9升级到5.3.6,按照以前的编译参数,configure能正常通过,但是在make的时候提示:

In file included from /root/php-5.3.6/ext/gd/libgd/gd_compat.c:8:
/usr/local/jpeg/include/jpeglib.h:938: error: expected declaration specifiers or ‘...’ before ‘FILE’
/usr/local/jpeg/include/jpeglib.h:939: error: expected declaration specifiers or ‘...’ before ‘FILE’
make: *** [ext/gd/libgd/gd_compat.lo] Error 1
百度谷歌了好久,网上给的方案是修改 php-5.3.6/ext/gd/libgd/gd_compat.c 的代码。把文件里面的png.h和jpeglib.h路径改成自己环境下的绝对路径,比如:/usr/local/libpng/include/png.h  和 /usr/local/jpeg/include/jpeglib.h 重新configure, make 结果还是不行,提示同样错误。后来看到国外的一个论坛上找到了解决方法:
修改php-5.3.6/ext/gd/libgd/gd_compat.c 把png.h 改成绝对路径(这个在编译gd库的时候应该就碰到了,同样的路径即可)
并在# include <jpeglib.h> 前面增加一行 #include <stdio.h>   
然后make clean
重新configure  、make 、make install 就可以了。

转载于:https://www.cnblogs.com/gaohj/p/3274697.html

php5.3.*编译出现make: *** [ext/gd/libgd/gd_compat.lo] Error 1 解决方法相关推荐

  1. 安装php出现 “make: *** [ext/gd/libgd/gd_jpeg.lo] Error ”

    安装PHP的时候,我使用的编译参数为 ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql/ --with-apxs2=/ ...

  2. Mingw-W64编译Windows程序提示:undefined reference to `__imp_GetStockObject' 的解决方法

    gcc(Mingw-W64)编译windows程序,提示undefined reference to `__imp_GetStockObject' 的解决方法:加上-mwindows,问题解决. #i ...

  3. gcc编译出现dlopen、dlerror、dlsym、dlcolse的解决方法

    gcc编译出现dlopen.dlerror.dlsym.dlcolse的解决方法 参考文章: (1)gcc编译出现dlopen.dlerror.dlsym.dlcolse的解决方法 (2)https: ...

  4. IDEA编译时出现“cannot resolve symbol“的问题时的解决方法。

    IDEA编译时出现"cannot resolve symbol"的问题时的解决方法. 参考文章: (1)IDEA编译时出现"cannot resolve symbol&q ...

  5. make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1

    当配置PHP时出现  make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1 时 是因为服务器内存不足1G. 只需要在配置命令中添加 --dis ...

  6. php的gd不支持jpeg,gd库不支持jpeg的解决方法

    杜工就不在这里啰嗦怎么遇到这个问题的了,如果你确实安装了的gd库,却发现无法支持jpeg格式的图片,可从下面找到答案. 原因是在编译gd库前,配置时未声明jpeg库路径.解决方法如下: 32位系统: ...

  7. 编译php时提示“Cannot find MySQL header files”的解决方法

    由于系统中被别人已经用rpm包安装过mysql了 在编译php时参数如下: /configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/ap ...

  8. 编译安装php之安装libiconv-1.14.tar.gz出错解决方法

    一.实验报错如下: make[2]: Entering directory `/home/chen/tools/libiconv-1.14/srclib' make[3]: Entering dire ...

  9. 编译源码时出现 Checking API: checkapi-last (unknown): error 17解决方法

    原文地址::http://www.eoeandroid.com/thread-84145-1-1.html 相关网帖 1.关于android中的checkapi----http://blog.sina ...

最新文章

  1. 数控机床编程用c语言,基于C语言数控机床智能后置处理程序的制作-(1).pdf
  2. Science重磅:DeepMind再获突破,用AI开启理解电子相互作用之路
  3. 女生国庆和程序员相亲,就因为对方一个问题!女生:还要继续吗?
  4. TCP/IP协议 和 如何实现 互联网上点对点的通信
  5. Ubuntu将python2.7默认更改为python3.X版本
  6. GCDAynscSocket简单使用-客户端
  7. Webservice学习之——即时发布与定制发布
  8. samkoon触摸屏用什么软件编程_samdraw3.3软件下载
  9. java 同音字_pinyin: The high performance pinyin tool for java.(java 高性能中文转拼音工具。支持同音字。)...
  10. 优化 Laravel 网站打开速度9条
  11. Ubuntu14.04 安装Firefox flash插件
  12. 用Python快速分析和预测股票价格
  13. setTimeout expects a function as first argument but got undefined
  14. 基于Python库surprise的电影推荐系统
  15. 判断字符串是中文或者英文
  16. 选择电子商务平台:Shopify与WooCommerce
  17. Android7.0解决 android.os.FileUriExposedException: file:///storage/emulated/0/
  18. r55600h和i79750h哪个好
  19. mysql导入本地文件_Mysql透过txt文件导入本地数据_mysql
  20. 多线程Synchronized锁的使用与线程之间的通讯

热门文章

  1. mysql group by join_mysql – GROUP BY之后的LEFT JOIN?
  2. 蓝牙小电池图标_丽声小百科 | 乐趣助听器如何连接iPhone手机?
  3. java中如何关闭文件,在Java中捕获IOException后如何关闭文件?
  4. mac nginx apache mysql php 一键_Mac 下搭建 apache / nginx+php+mysql
  5. 掌握这些 NumPy Pandas 方法,快速提升数据处理效率!
  6. 键盘敲入 A 字母时,操作系统期间发生了什么...
  7. Pandas进阶大神!从0到100你只差这篇文章!
  8. 揭秘微信「看一看」如何精准挖掘你感兴趣的内容
  9. 97 岁诺奖得主的励志人生:本科学文学,博士转物理,54 岁才开始锂电池研究...
  10. GitHub 标星 8w!学完这份指南后,你就可以去 Google 面试了!