使用protobuf版本2.6.1 (我是通过自制软件安装的)
我在试着跑
$ protoc --go_out=../cloud/ *.proto我一直收到这个错误。
$ protoc-gen-go: program not found or is not executable
$ --go_out: protoc-gen-go: Plugin failed with status code 1.我在go路径中安装了protoc gen-go。其他人也有这个问题吗?
发布于 2016-01-20 17:58:56
使用
$ go get -u github.com/golang/protobuf/{proto,protoc-gen-go}比使用
$ sudo apt-get install golang-goprotobuf-dev因为最新的protoc-gen-go使用的是库github.com/golang/protobuf/proto,但protoc-gen-go在apt-get中使用的是现在不存在的库code.google.com/p/goprotobuf/proto。
发布于 2015-11-21 19:47:35
在Ubuntu 18.04上,这被验证可以解决这个问题:
sudo apt-get install golang-goprotobuf-dev
发布于 2019-03-23 06:56:45
我已经安装了Ubuntu18.04.02LTS并使用以下命令安装了protoc
sudo apt install protobuf-compiler我有我的GOPATH和GOBIN设置正确,但当我做protoc --go_out=. <filename>时,我仍然得到
protoc-gen-go: program not found or is not executable
--go_out: protoc-gen-go: Plugin failed with status code 1.在阅读了一堆地方之后,我能够找到这样做
go get -u github.com/golang/protobuf/protoc-gen-go能够解决这个问题。希望这能对外面的人有所帮助。
https://stackoverflow.com/questions/28099004
复制相似问题