dougu3988 2016-10-21 01:34 采纳率: 100%
浏览 30
已采纳

去协议缓冲区设置错误?

I am trying to follow the instructions from https://github.com/golang/protobuf and https://github.com/google/protobuf/releases to install protocol buffer. After I added the bin path from the download folder to $PATH, I tried to run protoc-gen-go, but it shows -bash: protoc-gen-go: command not found

Is there a way to tell if I have install the protobuf correctly?

Thanks.

  • 写回答

1条回答 默认 最新

  • dsk61780 2016-10-21 13:12
    关注

    Please repeat all steps:

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

    check/add to the end (I don't use GOROOT)

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

    reload profile (for sure)

    sudo shutdown -r now
    

    try now

    protoc --go_out=. *.proto
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点
  • ¥15 如何使用canvas在图片上进行如下的标注,以下代码不起作用,如何修改
  • ¥15 Windows 系统cmd后提示“加载用户设置时遇到错误”
  • ¥50 vue router 动态路由问题
  • ¥15 关于#.net#的问题:End Function
  • ¥15 无法import pycausal
  • ¥15 weditor无法连接模拟器Local server not started, start with?
  • ¥20 6-3 String类定义