cuda
initialization_error
ai_generated
true
CUDA error: shared object initialization failed (cudaErrorSharedObjectInitFailed)
ID: cuda/shared-object-init-failed
85%Fix Rate
88%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 12 | active | — | — | — |
Root Cause
CUDA runtime failed to load or initialize a shared library (.so file). Usually caused by missing or incompatible CUDA libraries, broken symlinks, or LD_LIBRARY_PATH not including the CUDA lib directory.
genericWorkarounds
-
88% success Fix library paths: ensure LD_LIBRARY_PATH includes CUDA lib directory
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH && ldconfig
-
85% success Rebuild broken symlinks for CUDA libraries
ls -la /usr/local/cuda/lib64/libcud*. Fix broken symlinks with ln -sf to point to actual .so files.
-
90% success Clean install CUDA toolkit: remove old installation first
apt-get purge 'cuda*' 'libcud*' && apt-get install cuda-toolkit-12-x
Dead Ends
Common approaches that don't work:
-
Reinstall the CUDA toolkit over the existing installation
55% fail
Overlapping installations create conflicting library versions; the old broken symlinks may persist
-
Copy .so files from another machine
80% fail
CUDA libraries must match the exact driver and toolkit version on the host; mismatched libraries cause more errors
Error Chain
Leads to:
Preceded by:
Frequently confused with: