• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

编译php 5.4.11报错了,求帮助,该如何解决

php 搞代码 3年前 (2022-01-24) 14次浏览 已收录 0个评论

编译php 5.4.11报错了,求帮助
错误信息:/sr

!本文来源gaodai.ma#com搞#代!码(网

搞gaodaima代码c/php-5.4.11/ext/gd/gd.c -o ext/gd/gd.lo
In file included from /usr/local/src/php-5.4.11/ext/gd/gd.c:58:
/usr/local/src/php-5.4.11/ext/gd/libgd/gd_compat.h:43: 错误:嵌套的 ‘enum gdPixelateMode’ 重定义
/usr/local/src/php-5.4.11/ext/gd/libgd/gd_compat.h:43: 错误:‘enum gdPixelateMode’ 重声明
/usr/local/src/php-5.4.11/ext/gd/libgd/gd_compat.h:44: 错误:枚举 ‘GD_PIXELATE_UPPERLEFT’ 重声明
/usr/lamp/gd2//include/gd.h:886: 错误:‘GD_PIXELATE_UPPERLEFT’ 的上一个定义在此
/usr/local/src/php-5.4.11/ext/gd/libgd/gd_compat.h:46: 错误:枚举 ‘GD_PIXELATE_AVERAGE’ 重声明
/usr/lamp/gd2//include/gd.h:888: 错误:‘GD_PIXELATE_AVERAGE’ 的上一个定义在此
make: *** [ext/gd/gd.lo] 错误 1
[[email protected] php-5.4.11]#

configure内容:
[[email protected] php-5.4.11]# ./configure –prefix=/usr/lamp/php –with-config-file-path=/usr/lamp/php/etc –with-apxs2=/usr/lamp/apache243/bin/apxs –with-mysql=/usr/lamp/mysql/ –with-libxml-dir=/usr/lamp/libxml2/ –with-png-dir=/usr/lamp/libpng/ –with-jpeg-dir=/usr/lamp/jpeg9/ –with-freetype-dir=/usr/lamp/freetype/ –with-gd=/usr/lamp/gd2/ –with-zlib-dir=/usr/lamp/zlib/ –with-mcrypt=/usr/lamp/libmcrypt/ –with-mysqli=/usr/lamp/mysql/bin/mysql_config –enable-soap –enable-mbstring=all –enable-sockets
——解决方案——————–
php源码包里有gd扩展 直接–with-gd就行了 不然会有冲突
——解决方案——————–
不知道是不是以前我编译时遇到的错误,如果是的话需要自己修改里面文件的某个地方,查一下精华区好像我有写。不过我记得是在64BIT上才有这事,你这是在64BIT上吗?


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:编译php 5.4.11报错了,求帮助,该如何解决
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址