Unable to build protobuf to go endpoint

后端 未结 12 791
日久生厌
日久生厌 2021-01-30 12:39

using protobuf version 2.6.1 ( which i installed via homebrew)

I am trying to run

$ protoc --go_out=../cloud/ *.proto

I keep receiv

12条回答
  •  再見小時候
    2021-01-30 13:18

    Using

    $ go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
    

    is more safe than using

    $ sudo apt-get install golang-goprotobuf-dev
    

    Because the latest protoc-gen-go is using the lib github.com/golang/protobuf/proto, but protoc-gen-go in apt-get using the lib code.google.com/p/goprotobuf/proto which didn't exist now.

提交回复
热议问题