Heim  >  Artikel  >  Backend-Entwicklung  >  php-extension - php7 如何安装扩展 protobuf ?

php-extension - php7 如何安装扩展 protobuf ?

WBOY
WBOYOriginal
2016-10-17 09:30:173000Durchsuche

在centos 7 中,如何安装 PHP7 的扩展 protobuf?

我现在在我的服务器上安装 php 的 protobuf 安装不成功!

我使用的扩展是 https://github.com/allegro/ph... ?

在编译安装的时候 phpize 和 ./configure 都过了,但是到了 make 的时候就报错!

部分错误如下:

<code>/home/lvyun/php-protobuf/protobuf.c: In function ?.b_parse_field_value
/home/lvyun/php-protobuf/protobuf.c:1004:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_DOUBLE;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1009:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1014:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1019:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_DOUBLE;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1024:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1029:22: error: ?.S_BOOL?.undeclause in this function)
    Z_TYPE_P(value) = IS_BOOL;
                      ^
/home/lvyun/php-protobuf/protobuf.c:1034:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;</code>

求教,这是什么原因?是 扩展的版本没有跟上吗?还是因为有什么依赖没有安装?

如果这个扩展包不能安装在 php7 上,那还有什么扩展可以安装?

回复内容:

在centos 7 中,如何安装 PHP7 的扩展 protobuf?

我现在在我的服务器上安装 php 的 protobuf 安装不成功!

我使用的扩展是 https://github.com/allegro/ph... ?

在编译安装的时候 phpize 和 ./configure 都过了,但是到了 make 的时候就报错!

部分错误如下:

<code>/home/lvyun/php-protobuf/protobuf.c: In function ?.b_parse_field_value
/home/lvyun/php-protobuf/protobuf.c:1004:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_DOUBLE;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1009:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1014:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1019:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_DOUBLE;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1024:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;
                    ^
/home/lvyun/php-protobuf/protobuf.c:1029:22: error: ?.S_BOOL?.undeclause in this function)
    Z_TYPE_P(value) = IS_BOOL;
                      ^
/home/lvyun/php-protobuf/protobuf.c:1034:20: error: lvalue required as leof assignment
    Z_TYPE_P(value) = IS_LONG;</code>

求教,这是什么原因?是 扩展的版本没有跟上吗?还是因为有什么依赖没有安装?

如果这个扩展包不能安装在 php7 上,那还有什么扩展可以安装?

https://github.com/google/pro...
直接使用官方库不行吗?

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn