支付宝赞助帐号:service@kuitao8.com 

php安装zip报错的解决方法

Created2018-04-29   Views 634    Author 懒人程序

报错如下

checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libra                                                                                                                                                             ries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
[root@iZj6c9fycfu187h152lcsxZ zip-1.15.2]# make
/bin/sh /usr/src/zip-1.15.2/libtool --mode=compile cc -I/usr/local/include -I. -                                                                                                                                                             I/usr/src/zip-1.15.2 -DPHP_ATOM_INC -I/usr/src/zip-1.15.2/include -I/usr/src/zip                                                                                                                                                             -1.15.2/main -I/usr/src/zip-1.15.2 -I/usr/local/php/include/php -I/usr/local/php                                                                                                                                                             /include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php                                                                                                                                                             /Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib                                                                                                                                                              -I/usr/src/zip-1.15.2/php7  -DHAVE_CONFIG_H  -g -O2   -c /usr/src/zip-1.15.2/ph                                                                                                                                                             p7/php_zip.c -o php7/php_zip.lo
mkdir php7/.libs
 cc -I/usr/local/include -I. -I/usr/src/zip-1.15.2 -DPHP_ATOM_INC -I/usr/src/zip                                                                                                                                                             -1.15.2/include -I/usr/src/zip-1.15.2/main -I/usr/src/zip-1.15.2 -I/usr/local/ph                                                                                                                                                             p/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSR                                                                                                                                                             M -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/loca                                                                                                                                                             l/php/include/php/ext/date/lib -I/usr/src/zip-1.15.2/php7 -DHAVE_CONFIG_H -g -O2                                                                                                                                                              -c /usr/src/zip-1.15.2/php7/php_zip.c  -fPIC -DPIC -o php7/.libs/php_zip.o
In file included from /usr/src/zip-1.15.2/php7/php_zip.h:31,
                 from /usr/src/zip-1.15.2/php7/php_zip.c:36:
/usr/local/include/zip.h:59:21: error: zipconf.h: No such file or directory
In file included from /usr/src/zip-1.15.2/php7/php_zip.h:31,
                 from /usr/src/zip-1.15.2/php7/php_zip.c:36:
/usr/local/include/zip.h:258: error: expected specifier-qualifier-list before ‘z                                                                                                                                                             ip_int64_t’
In file included from /usr/src/zip-1.15.2/php7/php_zip.h:31,
                 from /usr/src/zip-1.15.2/php7/php_zip.c:36:
/usr/local/include/zip.h:285: error: expected specifier-qualifier-list before ‘z                                                                                                                                                             ip_uint64_t’
/usr/local/include/zip.h:307: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu                                                                                                                                                             te__’ before ‘zip_flags_t’
/usr/local/include/zip.h:309: error: expected declaration specifiers or ‘...’ be                                                                                                                                                             fore ‘*’ token
/usr/local/include/zip.h:309: error: expected declaration specifiers or ‘...’ be       

解决方法

在安装完新版的 libzip 时可能会出现打不到 zipconf.h,手动复制一下 cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
上一篇: lnmp thinkphp5 跨目录不能访问的问题解决
下一篇: PHPExcel在PHP7中无法导出的解决方法
支持键盘 ← →

邮件订阅

订阅我们的精彩内容