blkmab 发表于 2017-5-27 16:08:45

Ubuntu14提示安装PHP失败

显示php安装失败 麻烦军哥帮忙看看

licess 发表于 2017-5-27 19:10:36

In file included from /usr/include/png.h:536:0,
               from /root/lnmp1.3-full/src/php-7.0.7/ext/gd/libgd/gd_png.c:10:
/usr/include/zlib.h:86:5: error: unknown type name ‘z_const’
   z_const Bytef *next_in;   /* next input byte */
   ^
/usr/include/zlib.h:86:19: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
   z_const Bytef *next_in;   /* next input byte */
                   ^
In file included from /usr/include/zlib.h:34:0,
               from /usr/include/png.h:536,
               from /root/lnmp1.3-full/src/php-7.0.7/ext/gd/libgd/gd_png.c:10:
/usr/include/zlib.h:1025:29: error: unknown type name ‘z_const’
typedef unsigned (*in_func) OF((void FAR *,
                           ^
/usr/include/zlib.h:1029:33: error: unknown type name ‘in_func’
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
                                 ^
In file included from /usr/include/png.h:536:0,
               from /root/lnmp1.3-full/src/php-7.0.7/ext/gd/libgd/gd_png.c:10:
/usr/include/zlib.h:1349:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Z_ARG’
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
                              ^
/usr/include/zlib.h:1673:5: error: unknown type name ‘z_off64_t’
   z_off64_t pos;
   ^
/usr/include/zlib.h:1748:1: error: unknown type name ‘z_crc_t’
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
^
/usr/include/zlib.h:1758:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Z_ARG’
ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
                                          ^
make: *** Error 1
不大清楚原因,php7的话建议使用高版本的ubuntu
页: [1]
查看完整版本: Ubuntu14提示安装PHP失败