Heim  >  Artikel  >  Backend-Entwicklung  >  centos下编译安装php-protobuf时编译报错

centos下编译安装php-protobuf时编译报错

WBOY
WBOYOriginal
2016-10-10 11:56:231579Durchsuche

资源从https://github.com/allegro/ph...下载的;
Centos下编译:

<code>/usr/local/php/bin/phpize;
./configure --with-php-config=/usr/local/php/bin/php-config;
make;</code>

执行到这里就报错了!

<code>/usr/local/src/php-protobuf-master/protobuf.c: 在函数‘pb_parse_field_value’中:
/usr/local/src/php-protobuf-master/protobuf.c:1044: 错误:‘tsrm_ls’未声明(在此函数内第一次使用)
/usr/local/src/php-protobuf-master/protobuf.c:1044: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/usr/local/src/php-protobuf-master/protobuf.c:1044: 错误:所在的函数内也只报告一次。)
/usr/local/src/php-protobuf-master/protobuf.c: 在函数‘pb_serialize_packed_field’中:
/usr/local/src/php-protobuf-master/protobuf.c:1154: 错误:‘tsrm_ls’未声明(在此函数内第一次使用)
make: *** [protobuf.lo] 错误 1</code>

在这个编译安装之前https://github.com/google/pro...这里的已经安装成功;

回复内容:

资源从https://github.com/allegro/ph...下载的;
Centos下编译:

<code>/usr/local/php/bin/phpize;
./configure --with-php-config=/usr/local/php/bin/php-config;
make;</code>

执行到这里就报错了!

<code>/usr/local/src/php-protobuf-master/protobuf.c: 在函数‘pb_parse_field_value’中:
/usr/local/src/php-protobuf-master/protobuf.c:1044: 错误:‘tsrm_ls’未声明(在此函数内第一次使用)
/usr/local/src/php-protobuf-master/protobuf.c:1044: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/usr/local/src/php-protobuf-master/protobuf.c:1044: 错误:所在的函数内也只报告一次。)
/usr/local/src/php-protobuf-master/protobuf.c: 在函数‘pb_serialize_packed_field’中:
/usr/local/src/php-protobuf-master/protobuf.c:1154: 错误:‘tsrm_ls’未声明(在此函数内第一次使用)
make: *** [protobuf.lo] 错误 1</code>

在这个编译安装之前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