{
  "id": "go/protoc-gen-go-missing-plugin",
  "signature": "protoc-gen-go: program not found or is not executable",
  "signature_zh": "protoc-gen-go: 找不到程序或不可执行",
  "regex": "protoc\\-gen\\-go:\\ program\\ not\\ found\\ or\\ is\\ not\\ executable",
  "domain": "go",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "protoc cannot locate the protoc-gen-go plugin binary on PATH. It is installed via go install but $GOPATH/bin is not on PATH, or the binary name is wrong.",
  "root_cause_type": "generic",
  "root_cause_zh": "protoc 在 PATH 上找不到 protoc-gen-go 插件二进制。它通过 go install 安装，但 $GOPATH/bin 未加入 PATH，或二进制名称不对。",
  "versions": [
    {
      "version": "google.golang.org/protobuf v1.28+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error is about the Go plugin, not the protoc compiler. Reinstalling protoc does not add protoc-gen-go to PATH.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "protoc resolves plugins by name on PATH; passing a binary path as an output directory is invalid.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "go install google.golang.org/protobuf/cmd/protoc-gen-go@latest\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\nwhich protoc-gen-go",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "protoc --plugin=protoc-gen-go=$(go env GOPATH)/bin/protoc-gen-go \\\n  --go_out=. user.proto",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}