开发者社区> 问答> 正文

linux 安装gd库报错求大神解决?报错

gd_png.c:16:53: error: png.h: No such file or directory
gd_png.c:47: error: expected specifier-qualifier-list before 'jmp_buf'
gd_png.c:54: error: expected ')' before 'png_ptr'
gd_png.c:82: error: expected ')' before 'png_ptr'
gd_png.c:92: error: expected ')' before 'png_ptr'
gd_png.c:98: error: expected ')' before 'png_ptr'
gd_png.c: In function 'gdImageCreateFromPngCtx':
gd_png.c:125: error: 'png_byte' undeclared (first use in this function)
gd_png.c:125: error: (Each undeclared identifier is reported only once
gd_png.c:125: error: for each function it appears in.)
gd_png.c:125: error: expected ';' before 'sig'
gd_png.c:126: error: 'png_structp' undeclared (first use in this function)
gd_png.c:126: error: expected ';' before 'png_ptr'
gd_png.c:127: error: 'png_infop' undeclared (first use in this function)
gd_png.c:127: error: expected ';' before 'info_ptr'
gd_png.c:128: error: 'png_uint_32' undeclared (first use in this function)
gd_png.c:128: error: expected ';' before 'width'
gd_png.c:131: error: 'png_colorp' undeclared (first use in this function)
gd_png.c:131: error: expected ';' before 'palette'
gd_png.c:132: error: 'png_color_16p' undeclared (first use in this function)
gd_png.c:132: error: expected ';' before 'trans_gray_rgb'
gd_png.c:133: error: expected ';' before 'trans_color_rgb'
gd_png.c:134: error: 'png_bytep' undeclared (first use in this function)
gd_png.c:134: error: expected ';' before 'trans'
gd_png.c:135: error: expected ';' before 'image_data'
gd_png.c:136: error: 'png_bytepp' undeclared (first use in this function)
gd_png.c:136: error: expected ';' before 'row_pointers'
gd_png.c:144: error: 'sig' undeclared (first use in this function)
gd_png.c:157: error: 'png_ptr' undeclared (first use in this function)
gd_png.c:157: error: 'PNG_LIBPNG_VER_STRING' undeclared (first use in this function)
gd_png.c:157: error: 'gdPngErrorHandler' undeclared (first use in this function)
gd_png.c:166: error: 'info_ptr' undeclared (first use in this function)
gd_png.c:182: error: 'jmpbuf_wrapper' has no member named 'jmpbuf'
gd_png.c:192: error: 'gdPngReadData' undeclared (first use in this function)
gd_png.c:195: error: 'width' undeclared (first use in this function)
gd_png.c:195: error: 'height' undeclared (first use in this function)
gd_png.c:196: error: 'PNG_COLOR_TYPE_RGB' undeclared (first use in this function)
gd_png.c:196: error: 'PNG_COLOR_TYPE_RGB_ALPHA' undeclared (first use in this function)
gd_png.c:204: error: 'image_data' undeclared (first use in this function)
gd_png.c:205: error: 'row_pointers' undeclared (first use in this function)
gd_png.c:220: error: 'jmpbuf_wrapper' has no member named 'jmpbuf'
gd_png.c:233: error: 'PNG_COLOR_TYPE_PALETTE' undeclared (first use in this function)
gd_png.c:234: error: 'palette' undeclared (first use in this function)
gd_png.c:238: error: 'PNG_INFO_tRNS' undeclared (first use in this function)
gd_png.c:246: error: 'trans' undeclared (first use in this function)
gd_png.c:258: error: 'PNG_COLOR_TYPE_GRAY' undeclared (first use in this function)
gd_png.c:259: error: 'PNG_COLOR_TYPE_GRAY_ALPHA' undeclared (first use in this function)
gd_png.c:261: error: expected ')' before 'gdMalloc'
gd_png.c:280: error: 'trans_gray_rgb' undeclared (first use in this function)
gd_png.c:305: error: 'trans_color_rgb' undeclared (first use in this function)
gd_png.c:322: error: 'rowbytes' undeclared (first use in this function)
gd_png.c:327: error: expected ';' before 'gdMalloc'
gd_png.c:345: error: expected ';' before 'gdMalloc'
gd_png.c:357: error: 'h' undeclared (first use in this function)
gd_png.c:381: error: 'PNG_INTERLACE_ADAM7' undeclared (first use in this function)
gd_png.c:389: error: 'w' undeclared (first use in this function)
gd_png.c:390: error: expected '=', ',', ';', 'asm' or 'attribute' before 'r'
gd_png.c:390: error: 'r' undeclared (first use in this function)
gd_png.c:391: error: expected '=', ',', ';', 'asm' or 'attribute' before 'g'
gd_png.c:391: error: 'g' undeclared (first use in this function)
gd_png.c:392: error: expected '=', ',', ';', 'asm' or 'attribute' before 'b'
gd_png.c:392: error: 'b' undeclared (first use in this function)
gd_png.c:401: error: expected '=', ',', ';', 'asm' or 'attribute' before 'r'
gd_png.c:402: error: expected '=', ',', ';', 'asm' or 'attribute' before 'g'
gd_png.c:403: error: expected '=', ',', ';', 'asm' or 'attribute' before 'b'
gd_png.c:410: error: expected '=', ',', ';', 'asm' or 'attribute' before 'a'
gd_png.c:410: error: 'a' undeclared (first use in this function)
gd_png.c:419: error: expected '=', ',', ';', 'asm' or 'attribute' before 'idx'
gd_png.c:419: error: 'idx' undeclared (first use in this function)
gd_png.c: In function 'gdImagePngCtxEx':
gd_png.c:499: error: 'png_byte' undeclared (first use in this function)
gd_png.c:499: error: expected ';' before 'trans_values'
gd_png.c:500: error: 'png_color_16' undeclared (first use in this function)
gd_png.c:500: error: expected ';' before 'trans_rgb_value'
gd_png.c:501: error: 'png_color' undeclared (first use in this function)
gd_png.c:501: error: expected ';' before 'palette'
gd_png.c:502: error: 'png_structp' undeclared (first use in this function)
gd_png.c:502: error: expected ';' before 'png_ptr'
gd_png.c:503: error: 'png_infop' undeclared (first use in this function)
gd_png.c:503: error: expected ';' before 'info_ptr'
gd_png.c:508: error: 'png_ptr' undeclared (first use in this function)
gd_png.c:508: error: 'PNG_LIBPNG_VER_STRING' undeclared (first use in this function)
gd_png.c:509: error: 'gdPngErrorHandler' undeclared (first use in this function)
gd_png.c:520: error: 'info_ptr' undeclared (first use in this function)
gd_png.c:524: error: 'png_infopp' undeclared (first use in this function)
gd_png.c:529: error: 'jmpbuf_wrapper' has no member named 'jmpbuf'
gd_png.c:537: error: 'gdPngWriteData' undeclared (first use in this function)
gd_png.c:538: error: 'gdPngFlushData' undeclared (first use in this function)
gd_png.c:595: error: 'PNG_INTERLACE_ADAM7' undeclared (first use in this function)
gd_png.c:595: error: 'PNG_INTERLACE_NONE' undeclared (first use in this function)
gd_png.c:602: error: 'PNG_COLOR_TYPE_RGB_ALPHA' undeclared (first use in this function)
gd_png.c:603: error: 'PNG_COMPRESSION_TYPE_DEFAULT' undeclared (first use in this function)
gd_png.c:604: error: 'PNG_FILTER_TYPE_DEFAULT' undeclared (first use in this function)
gd_png.c:609: error: 'PNG_COLOR_TYPE_RGB' undeclared (first use in this function)
gd_png.c:617: error: 'PNG_COLOR_TYPE_PALETTE' undeclared (first use in this function)
gd_png.c:623: error: 'trans_rgb_value' undeclared (first use in this function)
gd_png.c:672: error: 'trans_values' undeclared (first use in this function)
gd_png.c:694: error: 'palette' undeclared (first use in this function)
gd_png.c:725: error: 'png_bytep' undeclared (first use in this function)
gd_png.c:725: error: 'row_pointers' undeclared (first use in this function)
gd_png.c:731: error: 'prow_pointers' undeclared (first use in this function)
gd_png.c:747: error: expected ')' before 'gdMalloc'
gd_png.c:804: error: expected ')' before 'gdMalloc'
make[2]: *** [gd_png.lo] Error 1
make[2]: Leaving directory /usr/local/src/gd-2.0.35' <br> make[1]: *** [all-recursive] Error 1 <br> make[1]: Leaving directory/usr/local/src/gd-2.0.35'
make: *** [all] Error 2

展开
收起
爱吃鱼的程序员 2020-06-14 20:44:23 663 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    没有安装libpng库

    2020-06-14 20:44:40
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载