0

I simply write the following code to the CMD,

set PATH="$PATH:$(go env GOPATH)/bin"

and don't know whether I do something sensible or not.

I just replaced expose with set because of Windows.

What should be done next to complete the installation successfully?

Could you provide how you would install it as if it were your PC as a raw string without any shell variable? Because I'm not comfortable with Shell yet.

ibrahim koz
  • 537
  • 4
  • 15
  • 1
    You're following the instructions on https://grpc.io/docs/languages/go/quickstart/ ? That's written for unix (although it doesn't say so). I'm not an expert on windows, but I think you need to follow this: https://stackoverflow.com/questions/9546324/adding-a-directory-to-the-path-environment-variable-in-windows – Paul Hankin Jan 09 '22 at 16:05

1 Answers1

1

For everyone who comes here:

  • first of all, you should download the latest version of the protocol buffer:

    download from this link and install the version that you want, like: protoc-3.19.3-win64.zip

    after that add the binary path that you installed on the path environment. ( for more information about adding to path environment see this link)

  • after that you need to install the proto compiler for the language you want. in this example I choose go:

$ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1

Note: The GOPATH should be in environments. also GOPATH/bin.

ttrasn
  • 4,322
  • 4
  • 26
  • 43