解决protoc-gen-go-grpc program not found or is not executable问题

在fedora32上,发现protobuf文件无法生成go语言的grpc的gateway,很奇怪,网上说是因为protobuf中protoc版本问题,也有说插件protoc-gen-go版本问题,其实,是google官方和github官方的"包冲突"问题,通过
dnf provides */protoc-gen-go
发现有golang-github-protobuf和golang-google-protobuf两个包,github的protoc-gen-go版本较低,google的protoc-gen-go版本较高,需要用到protoc-gen-go-grpc ,而这个插件还没有release,导致生成go文件失败。于是,卸载:
sudo rpm -e  golang-google-protobuf --nodeps
接着安装:
sudo dnf install golang-github-protobuf -y
大功告成 :)

Monthly Archives

Pages

Powered by Movable Type 7.7.2

About this Entry

This page contains a single entry by Cnangel published on October 19, 2020 8:28 PM.

关于mac系统上brew的安装 was the previous entry in this blog.

关于运行库和开发库区别 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.