ShaoZeMing / protoc-gen-hyperf

protoc-gen-hyperf hyperf 根据.proto 生成hyperf 代码文件结构,包括client 和 route
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

--hyperf_out: protoc-gen-hyperf: Plugin failed with status code 255 #2

Closed cexll closed 2 years ago

cexll commented 2 years ago
which php 
/usr/bin/php

 php -v
PHP 8.0.10 (cli) (built: Sep 23 2021 08:58:23) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.14, Copyright (c), by Zend Technologies
    with Yasd v0.3.9-alpha, Our Copyright, by codinghuang
php --ri protobuf

protobuf

Version => 3.19.1

Directive => Local Value => Master Value
protobuf.keep_descriptor_pool_after_request => 0 => 0
 protoc --php_out=app/Grpc   --hyperf_out=app/Grpc    app/Grpc/TccFail.proto
PHP Fatal error:  Uncaught Error: Class "GPBMetadata\Plugin" not found in phar:///usr/bin/protoc-gen-hyperf/src/Google/Protobuf/Compiler/CodeGeneratorResponse.php:63
Stack trace:
#0 phar:///usr/bin/protoc-gen-hyperf/bin/protoc-gen-hyperf(15): Google\Protobuf\Compiler\CodeGeneratorResponse->__construct()
#1 /usr/bin/protoc-gen-hyperf(10): include('...')
#2 {main}
  thrown in phar:///usr/bin/protoc-gen-hyperf/src/Google/Protobuf/Compiler/CodeGeneratorResponse.php on line 63
--hyperf_out: protoc-gen-hyperf: Plugin failed with status code 255.
ShaoZeMing commented 2 years ago

需要php 安装 protobuf 扩展

cexll commented 2 years ago

需要php 安装 protobuf 扩展

你看下我的信息 安装了的

 php -v
PHP 8.0.10 (cli) (built: Sep 23 2021 08:58:23) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.14, Copyright (c), by Zend Technologies
    with Yasd v0.3.9-alpha, Our Copyright, by codinghuang
php --ri protobuf

protobuf

Version => 3.19.1

Directive => Local Value => Master Value
protobuf.keep_descriptor_pool_after_request => 0 => 0