0

我正在尝试在我的 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

这也给出了类似的错误。

如何解决这个问题?提前致谢!

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

4

0 回答 0