You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify the distinction between protoc and protoc-gen-go installation:
- protoc is the Protocol Buffer compiler
- protoc-gen-go is the Go language plugin for protoc
- Both are required for generating Go code from .proto files
Updated both CCA and PSA demo documentation to provide clear,
platform-specific installation instructions with troubleshooting guidance.
Fixes#59
Signed-off-by: 7908837174 <7908837174@github.com>
# Download protoc-25.1-win64.zip from the releases page and extract to a directory
65
+
# Add the bin directory to your PATH environment variable
66
+
```
67
+
68
+
To verify installation:
69
+
```sh
70
+
protoc --version
71
+
```
72
+
73
+
2.**Go Protocol Buffer Plugin (protoc-gen-go) version v1.26**
74
+
75
+
> **Important**: This is separate from protoc and must be installed via Go:
76
+
77
+
```sh
78
+
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26.0
79
+
```
80
+
3.**protoc-gen-go-grpc version v1.1**
81
+
```sh
82
+
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
83
+
```
84
+
85
+
4.**protoc-gen-go-json version v1.1.0**
86
+
```sh
87
+
go install github.com/mitchellh/protoc-gen-go-json@v1.1.0
88
+
```
89
+
90
+
5.**mockgen version v1.6.0**
91
+
```sh
92
+
go install github.com/golang/mock/mockgen@v1.6.0
93
+
```
94
+
95
+
### Troubleshooting
96
+
97
+
If you encounter issues with the above installation:
98
+
99
+
**protoc not found:**
100
+
- Ensure `$HOME/.local/bin` is in your `$PATH`
101
+
- Try `which protoc` to verify installation location
102
+
- For system-wide installation, extract to `/usr/local` instead of `$HOME/.local`
103
+
104
+
**protoc-gen-go not found:**
105
+
- Verify Go is properly installed: `go version`
106
+
- Ensure `$GOPATH/bin` (or `$HOME/go/bin`) is in your `$PATH`
107
+
- Try `which protoc-gen-go` to verify the plugin is available
108
+
- If using Go modules, the default GOPATH is `$HOME/go`
109
+
110
+
**Permission issues:**
111
+
- Use `sudo` for system-wide installation of protoc
112
+
- For Go packages, avoid `sudo` as they install in user space
113
+
114
+
**Build failures with "protoc-gen-go: program not found or is not executable":**
115
+
- This indicates protoc cannot find the protoc-gen-go plugin
116
+
- Verify both protoc and protoc-gen-go are installed and in PATH
117
+
- Try running: `protoc-gen-go --version` to test the plugin directly
118
+
119
+
**Note:** protoc (the compiler) and protoc-gen-go (the Go plugin) are separate tools that must both be installed for Go protocol buffer generation to work.
71
120
72
121
* Commands below assume execution in a Bourne-compatible shell. Please adjust appropriately in case any other shell is used.
0 commit comments