51CTO技术论坛_中国领先的IT技术社区 - 文本版

yang12313 发表于 2011-5-4 17:20

PHP编译GD错误,来帮忙解决一下!!

/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:1349: undefined reference to `gdFontCacheShutdown'
ext/gd/.libs/gd.o: In function `_php_image_convert':
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:5014: undefined reference to `gdImageCreateFromPng'
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:5002: undefined reference to `gdImageCreateFromJpeg'
ext/gd/.libs/gd.o: In function `_php_image_create_from':
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2687: undefined reference to `gdImageCreateFromJpeg'
ext/gd/.libs/gd.o: In function `zif_imagecreatefrompng':
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2739: undefined reference to `gdImageCreateFromPngCtx'
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2739: undefined reference to `gdImageCreateFromPng'
ext/gd/.libs/gd.o: In function `zif_imagecreatefromjpeg':
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2729: undefined reference to `gdImageCreateFromJpegCtx'
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2729: undefined reference to `gdImageCreateFromJpeg'
ext/gd/.libs/gd.o: In function `zif_imagecreatefromstring':
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2524: undefined reference to `gdImageCreateFromJpegCtx'
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2533: undefined reference to `gdImageCreateFromPngCtx'
ext/gd/.libs/gd.o: In function `zif_imagejpeg':
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:3009: undefined reference to `gdImageJpegCtx'
ext/gd/.libs/gd.o: In function `zif_imagepng':
/home/hcg/sssssssssssss/php-5.2.17/ext/gd/gd.c:2995: undefined reference to `gdImagePngCtxEx'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] 错误 1

yang12313 发表于 2011-5-5 09:33

没人啊

只得自己顶一个了

banban88724 发表于 2011-5-5 11:32

so easy

你在编译选项中使用了参数 --with-gd 选项时由于系统无法找到gd 的动态连接库文件或使用了64位版本的库文件所以导致编译失败!
解决方法:
1.一定要用tar.bz2的版本,不要用tar.gz的版本,对比看你可以发现两个格式的安装过程显示的都不一样!

2.GD路径一定要留空,GD最好也不自己指定路径重新安装一下(使用安装程序预设的路径).  就是用:  --with-gd    这种参数.

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.