安装go install 失败
来源:2-2 有关GRPC及GRPC Gateway版本的更新
慕粉2315407798
2021-03-09 22:34:52
go install \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \
github.com/golang/protobuf/protoc-gen-go
cannot find module providing package github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway: working directory is not part of a module
cannot find module providing package github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger: working directory is not part of a module
cannot find module providing package github.com/golang/protobuf/protoc-gen-go: working directory is not part of a module
2回答
请在有go.mod的目录下运行该命令。见Go语言vscode配置中的go mod init
喵呱种子
2021-07-22
https://blog.csdn.net/tao12345666333/article/details/111413070
有篇帖子说go 1.16在模块中未出现在go.mod中的包也是无法安装的,可以通过go install <package><version>安装,或者go install -v <package>进行安装,
安装完成后可以在go/bin目录下查看安装包
相似问题
回答 1
回答 1