将Swoole设为失败的ubuntu16.04

时间:2018-09-16 14:24:31

标签: makefile installation pecl swoole

我正在尝试在Ubuntu-16.04上安装SWOOLE

我尝试了这个sudo pecl install swoole

但是却收到了很多错误(跳过了几行

In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable':
/tmp/pear/temp/swoole/php7_wrapper.h:238:5: error: unknown type name 'zend_string'
     zend_string *key = NULL;
     ^
/tmp/pear/temp/swoole/php7_wrapper.h:239:5: warning: passing argument 3 of 'zend_is_callable' from incompatible pointer type [enabled by default]
     int ret = zend_is_callable(cb, a, &key);
     ^
In file included from /usr/include/php5/main/php.h:39:0,
                 from /tmp/pear/temp/swoole/php_swoole.h:25,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/usr/include/php5/Zend/zend_API.h:301:20: note: expected 'char **' but argument is of type 'int **'
 ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name TSRMLS_DC);
                    ^
In file included from /usr/include/php5/Zend/zend.h:252:0,
                 from /usr/include/php5/main/php.h:35,
                 from /tmp/pear/temp/swoole/php_swoole.h:25,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h:240:29: error: request for member 'val' in something not a structure or union
     char *tmp = estrndup(key->val, key->len);
                             ^
/usr/include/php5/Zend/zend_alloc.h:78:44: note: in definition of macro 'estrndup'
 #define estrndup(s, length)     _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
                                            ^
/tmp/pear/temp/swoole/php7_wrapper.h:240:39: error: request for member 'len' in something not a structure or union
     char *tmp = estrndup(key->val, key->len);
                                       ^
/usr/include/php5/Zend/zend_alloc.h:78:49: note: in definition of macro 'estrndup'
 #define estrndup(s, length)     _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
                                                 ^
In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
                 from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable_ex':
/tmp/pear/temp/swoole/php7_wrapper.h:248:5: error: unknown type name 'zend_string'
     zend_string *key = NULL;
     ^
/tmp/pear/temp/swoole/php7_wrapper.h:249:5: warning: passing argument 4 of 'zend_is_callable_ex' from incompatible pointer type [enabled by default]
     int ret = zend_is_callable_ex(callable, NULL, check_flags, &key, fcc, error);

make: *** [swoole.lo] Error 1
ERROR: `make' failed

我也尝试过

cd swoole-src
./configure
make

也有类似的错误。

该如何解决?预先感谢!

编辑: 也添加了第一个生成的错误

0 个答案:

没有答案