{
  "id": "cuda/driver-library-not-loaded",
  "signature": "CUDA error: driver library is not loaded (cudaErrorDriverLibraryNotLoaded)",
  "signature_zh": "CUDA 错误：驱动程序库未加载 (cudaErrorDriverLibraryNotLoaded)",
  "regex": "CUDA error: driver library is not loaded",
  "domain": "cuda",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The CUDA driver shared library (libcuda.so) is not found or cannot be loaded, usually because the NVIDIA driver is not installed or the library path is missing.",
  "root_cause_type": "generic",
  "root_cause_zh": "CUDA 驱动程序共享库 (libcuda.so) 未找到或无法加载，通常是因为未安装 NVIDIA 驱动程序或缺少库路径。",
  "versions": [
    {
      "version": "CUDA 11.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CUDA 12.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CUDA 12.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Installing the CUDA toolkit without the NVIDIA driver is insufficient; the driver provides libcuda.so.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting LD_LIBRARY_PATH to a wrong directory (e.g., /usr/local/cuda/lib instead of lib64) does not help and may break other libraries.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install the NVIDIA driver matching your GPU and CUDA version. For Ubuntu 22.04 with CUDA 12.2: sudo apt update; sudo apt install nvidia-driver-535; sudo reboot. Verify with 'nvidia-smi' and 'ldconfig -p | grep libcuda'.",
      "success_rate": 0.85,
      "how": "Install the NVIDIA driver matching your GPU and CUDA version. For Ubuntu 22.04 with CUDA 12.2: sudo apt update; sudo apt install nvidia-driver-535; sudo reboot. Verify with 'nvidia-smi' and 'ldconfig -p | grep libcuda'.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the driver is installed but libcuda.so is not in the linker path, add it explicitly: sudo ldconfig /usr/lib/x86_64-linux-gnu/nvidia/current; or set LD_LIBRARY_PATH to that directory: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/nvidia/current:$LD_LIBRARY_PATH.",
      "success_rate": 0.8,
      "how": "If the driver is installed but libcuda.so is not in the linker path, add it explicitly: sudo ldconfig /usr/lib/x86_64-linux-gnu/nvidia/current; or set LD_LIBRARY_PATH to that directory: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/nvidia/current:$LD_LIBRARY_PATH.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Install the NVIDIA driver matching your GPU and CUDA version. For Ubuntu 22.04 with CUDA 12.2: sudo apt update; sudo apt install nvidia-driver-535; sudo reboot. Verify with 'nvidia-smi' and 'ldconfig -p | grep libcuda'.",
    "If the driver is installed but libcuda.so is not in the linker path, add it explicitly: sudo ldconfig /usr/lib/x86_64-linux-gnu/nvidia/current; or set LD_LIBRARY_PATH to that directory: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/nvidia/current:$LD_LIBRARY_PATH."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DRIVER.html",
  "official_doc_section": null,
  "error_code": "cudaErrorDriverLibraryNotLoaded",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2023-11-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}