go protocol buffer 设置错了吗?

go protocol buffer set up wrong?

我正在尝试按照 https://github.com/golang/protobuf 的说明进行操作,并且 https://github.com/google/protobuf/releases 安装协议缓冲区。我把下载文件夹的bin路径添加到$PATH后,我尝试运行protoc-gen-go,但它显示-bash: protoc-gen-go: command not found

有没有办法判断我是否正确安装了 protobuf?

谢谢。

请重复所有步骤:

go get -u github.com/golang/protobuf/protoc-gen-go
nano ~/.profile

check/add到最后(我没用GOROOT)

export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

重新加载配置文件(当然)

sudo shutdown -r now

立即尝试

protoc --go_out=. *.proto