请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

在安装yaf扩展的时候,出现错误,折腾了很久了,求救!

在make步骤的时候出现错误:

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:72:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string     *ext;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:73:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *base_uri;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:74:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *directory;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:75:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *local_library;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:76:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *local_namespaces;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:77:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *view_directory;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:78:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *view_ext;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:79:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *default_module;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:80:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *default_controller;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:81:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *default_action;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:28:

./php_yaf.h:82:2: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

        zend_string *bootstrap;

        ^~~~~~~~~~~

        zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:30:

./yaf_loader.h:69:23: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

int yaf_loader_import(zend_string *path, int use_path);

                      ^~~~~~~~~~~

                      zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:30:

./yaf_loader.h:72:59: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

yaf_loader_t *yaf_loader_instance(yaf_loader_t *this_ptr, zend_string *library_path, zend_string *global_path);

                                                          ^~~~~~~~~~~

                                                          zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:30:

./yaf_loader.h:72:86: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

yaf_loader_t *yaf_loader_instance(yaf_loader_t *this_ptr, zend_string *library_path, zend_string *global_path);

                                                                                     ^~~~~~~~~~~

                                                                                     zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:32:

./yaf_application.h:31:36: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

int yaf_application_is_module_name(zend_string *name);

                                   ^~~~~~~~~~~

                                   zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:35:

./yaf_view.h:34:53: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

void yaf_view_simple_clear_assign(yaf_view_t *view, zend_string *name);

                                                    ^~~~~~~~~~~

                                                    zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:36:

./yaf_controller.h:34:1: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

zend_string * yaf_controller_render(zval *instance, char *action_name, int len, zval *var_array);

^~~~~~~~~~~

zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:38:

./yaf_request.h:47:62: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

yaf_request_t *yaf_request_instance(yaf_request_t *this_ptr, zend_string *info);

                                                             ^~~~~~~~~~~

                                                             zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

In file included from /Users/John/downloads/yaf-3.0.5/yaf-3.0.5/yaf.c:38:

./yaf_request.h:48:54: error: unknown type name 'zend_string'; did you mean 'zend_stream'?

int yaf_request_set_base_uri(yaf_request_t *request, zend_string *base_uri, zend_string *request_uri);

                                                     ^~~~~~~~~~~

                                                     zend_stream

/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here

} zend_stream;

  ^

fatal error: too many errors emitted, stopping now [-ferror-limit=]


正在回答

2回答

同学,报一下你的php版本,而且你的yaf是从pecl下的最新版么?

0 回复 有任何疑惑可以回复我~
  • 提问者 约翰姜 #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2017-08-26 01:34:50
提问者 约翰姜 2017-08-26 01:34:42

谢谢老师!已经解决!我用相应版本的php-confg安装后解决了!

0 回复 有任何疑惑可以回复我~
  • 同学你怎么解决的?我这也是make时错误
    回复 有任何疑惑可以回复我~ 2017-08-27 02:21:59
  • 提问者 约翰姜 回复 每天是周末 #2
    我用绝对路径加上php-config来安装的。就是要安装到与你的php版本一致的config里面
    回复 有任何疑惑可以回复我~ 2017-09-01 03:03:27
问题已解决,确定采纳
还有疑问,暂不采纳
高性能的PHP API接口开发
  • 参与学习       1044    人
  • 解答问题       149    个

掌握核心API接口开发及性能调优,让你的代码运行效率加倍

了解课程
意见反馈 帮助中心 APP下载
官方微信