taianrc 发表于 2020-12-26 01:25:29

【已解答】php8 安装 fileinfo 扩展失败

操作系统: Aliyun Linux2.1903 LTS 64位

安装日志:
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
/bin/sh /www/server/php/80/src/ext/fileinfo/libtool --mode=compile cc -I. -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/src/ext/fileinfo/include -I/www/server/php/80/src/ext/fileinfo/main -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib-DHAVE_CONFIG_H-g -O2   -I/www/server/php/80/src/ext/fileinfo/libmagic -c /www/server/php/80/src/ext/fileinfo/libmagic/funcs.c -o libmagic/funcs.lo
cc -I. -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/src/ext/fileinfo/include -I/www/server/php/80/src/ext/fileinfo/main -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -I/www/server/php/80/src/ext/fileinfo/libmagic -c /www/server/php/80/src/ext/fileinfo/libmagic/funcs.c-fPIC -DPIC -o libmagic/.libs/funcs.o
/www/server/php/80/src/ext/fileinfo/libmagic/funcs.c: In function ‘file_checkfmt’:
/www/server/php/80/src/ext/fileinfo/libmagic/funcs.c:97:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (const char *p = fmt; *p; p++) {
^
/www/server/php/80/src/ext/fileinfo/libmagic/funcs.c:97:2: note: use option -std=c99 or -std=gnu99 to compile your code
make: *** Error 1
error


大炮运维V587 发表于 2020-12-26 10:30:02

您好,该操作系统是阿里云在原有的centos系统上二次开发的,导致一些gcc编译代码的时候出现错误,我们目前还未对此二开的centos系统做兼容,请使用原版本的centos8进行体验
页: [1]
查看完整版本: 【已解答】php8 安装 fileinfo 扩展失败