代码之家  ›  专栏  ›  技术社区  ›  Sumithran

Swoole make失败ubuntu16.04

  •  0
  • Sumithran  · 技术社区  · 6 年前

    我正在尝试在我的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 回复  |  直到 6 年前