我似乎无法正确安装 twirp 以使用 protobuf。
protoc --proto_path=$GOPATH/bin:. --twirp_out=. --go_out=. ./rpc/person/service.proto
是我在编译和创建我的 twirp 文件时尝试执行的命令,但是我收到以下错误:
protoc-gen-twirp:program not found or is not executable
--twirp_out: protoc-gen-twirp: Plugin failed with status code 1.
我的 .bashrc 已经为 Golang 提供了这两行:
export GOPATH=/home/carlosrueda/Documents/go
PATH=$PATH:/usr/local/bin/go/bin:$GOPATH
任何帮助解决这个问题将不胜感激,谢谢。
最佳答案
我通过在 .bashrc 的第二行末尾添加/bin 来解决此问题。 PATH=$PATH:/usr/local/bin/go/bin:$GOPATH/bin
关于go - Twirp 不适用于原型(prototype),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51366306/