一见

go的descriptorpb.Default_FileOptions_PhpGenericServices的undefined问题

在执行 go 编译是遇到如下问题:

go\pkg\mod\github.com\golang\protobuf@v1.5.2\protoc-gen-go\descriptor\descriptor.pb.go:106:61: undefined: descriptorpb.Default_FileOptions_PhpGenericServices

原因是下列两个依赖库版本不一致:

require (
	github.com/golang/protobuf v1.5.2 // indirect
	google.golang.org/protobuf v1.33.0 // indirect
)

解决办法:

require (
	github.com/golang/protobuf v1.5.4 // indirect
	google.golang.org/protobuf v1.33.0 // indirect
)

posted on 2024-03-11 16:03  -见  阅读(153)  评论(0编辑  收藏  举报

导航