我正在尝试在fedora 17上为我的php安装json扩展。
我从这里下载了包
http://pecl.php.net/get/json-1.2.1.tgz
并在目录中运行phpize
,然后进行配置,一切正常。
但是当我运行make时,会出现此错误。
我搜索了错误,但没有出现任何解决方案。
有什么建议吗?
我必须这样做因为我的php.ini配置我得到'--disable-json'
当我运行pecl install json启用扩展时,显示pecl的其他错误。 我想从pecl手动编译包!
谢谢!
感谢
[juan@fedoris json-1.2.1]$ sudo make
[sudo] password for juan:
/bin/sh /home/juan/recursos/json-php/json-1.2.1/libtool --mode=compile cc -I. -I/home/juan/recursos/json-php/json-1.2.1 -DPHP_ATOM_INC -I/home/juan/recursos/json-php/json-1.2.1/include -I/home/juan/recursos/json-php/json-1.2.1/main -I/home/juan/recursos/json-php/json-1.2.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/juan/recursos/json-php/json-1.2.1/json.c -o json.lo
cc -I. -I/home/juan/recursos/json-php/json-1.2.1 -DPHP_ATOM_INC -I/home/juan/recursos/json-php/json-1.2.1/include -I/home/juan/recursos/json-php/json-1.2.1/main -I/home/juan/recursos/json-php/json-1.2.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/juan/recursos/json-php/json-1.2.1/json.c -fPIC -DPIC -o .libs/json.o
/home/juan/recursos/json-php/json-1.2.1/json.c:44:1: error: unknown type name ‘function_entry’
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: braces around scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: (near initialization for ‘json_functions[0]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: initialization makes integer from pointer without a cast [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: (near initialization for ‘json_functions[0]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: (near initialization for ‘json_functions[0]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: (near initialization for ‘json_functions[0]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: (near initialization for ‘json_functions[0]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:45:5: warning: (near initialization for ‘json_functions[0]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: braces around scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: (near initialization for ‘json_functions[1]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: initialization makes integer from pointer without a cast [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: (near initialization for ‘json_functions[1]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: (near initialization for ‘json_functions[1]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: (near initialization for ‘json_functions[1]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: (near initialization for ‘json_functions[1]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:46:5: warning: (near initialization for ‘json_functions[1]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: braces around scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: (near initialization for ‘json_functions[2]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: initialization makes integer from pointer without a cast [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: (near initialization for ‘json_functions[2]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: (near initialization for ‘json_functions[2]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: excess elements in scalar initializer [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:47:5: warning: (near initialization for ‘json_functions[2]’) [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:58:5: warning: initialization from incompatible pointer type [enabled by default]
/home/juan/recursos/json-php/json-1.2.1/json.c:58:5: warning: (near initialization for ‘json_module_entry.functions’) [enabled by default]
make: *** [json.lo] Error 1
答案 0 :(得分:0)
您下载的软件包是在2006年发布的,用于php 4.您不太可能将其编译为php 5.4.5的扩展名。从指定中删除--disable-json
之后,最好使用phpinfo()中的“Configure Command”重新编译php。