{
  "id": "go/missing-cgo-pkg-config",
  "signature": "# pkg-config: exec: \"pkg-config\": executable file not found in $PATH",
  "signature_zh": "# pkg-config: exec: \"pkg-config\": 在$PATH中找不到可执行文件",
  "regex": "pkg-config: exec: \"pkg-config\": executable file not found in \\$PATH",
  "domain": "go",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "CGo packages requiring pkg-config for dependency resolution cannot find the pkg-config tool in the system PATH.",
  "root_cause_type": "generic",
  "root_cause_zh": "需要pkg-config进行依赖解析的CGo包在系统PATH中找不到pkg-config工具。",
  "versions": [
    {
      "version": "Go 1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Go 1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pkg-config 0.29.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Many CGo packages are essential for system-level operations; disabling CGo breaks compilation.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Some packages cannot be compiled without CGo; this only works for pure Go packages.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install pkg-config using the system package manager (e.g., apt-get install pkg-config on Debian/Ubuntu, brew install pkg-config on macOS)",
      "success_rate": 0.95,
      "how": "Install pkg-config using the system package manager (e.g., apt-get install pkg-config on Debian/Ubuntu, brew install pkg-config on macOS)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set PKG_CONFIG_PATH environment variable to point to custom pkg-config location if installed in non-standard path",
      "success_rate": 0.85,
      "how": "Set PKG_CONFIG_PATH environment variable to point to custom pkg-config location if installed in non-standard path",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Install pkg-config using the system package manager (e.g., apt-get install pkg-config on Debian/Ubuntu, brew install pkg-config on macOS)",
    "Set PKG_CONFIG_PATH environment variable to point to custom pkg-config location if installed in non-standard path"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pkg.go.dev/cmd/cgo",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-02-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}