﻿# Separate library search paths from driver installation

Treat ldconfig as library-discovery management and verify kernel driver integration through its own evidence.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-linux-ldconfig-driver/
Language: en

A model cannot find a driver-facing shared library, and an operator proposes rebuilding the linker cache as a complete driver repair. ldconfig manages library links and cache entries. It does not build or load the GPU kernel module. Separate user-space lookup from kernel integration before choosing a corrective action.

## Classify the observed error

Preserve whether failure occurred while locating a shared object, resolving a symbol, opening a device or initializing the runtime. These are different boundaries. A successful library lookup can precede device failure, while a loader error can stop the program before it attempts device access. Do not combine them into one unspecified statement that CUDA is missing.

## Inspect the cache as evidence

The documented read-only cache listing can show registered candidates and their paths. Compare architecture and intended library identity. A cache entry does not prove the current process loaded that object, and absence from the cache does not mean no other search mechanism can find it. Preserve the launcher's effective environment and embedded search conditions as separate evidence.

## Understand what cache rebuilding changes

ldconfig scans configured and trusted locations to update supported links and cache data. Rebuilding it does not create an absent library, install a driver package or produce a module for the running kernel. Adding a directory can also change lookup for unrelated applications. Keep any proposed mutation scoped to a demonstrated discovery problem rather than using it as a routine reset.

## Follow the kernel component separately

The GPU driver has kernel-module integration distinct from user-space library search. Verify the module's intended installation and compatibility through its documented path. A container's library view can differ from its host's module state. Copying arbitrary host libraries into an image can create another mismatch without repairing the original kernel-side condition or establishing a coherent packaged stack.

## Verify both stages independently

In an isolated equivalent, first confirm which library object the loader actually resolves, then test a bounded device operation with the intended driver arrangement. Record the stage and result. Acceptance means both lookup and device integration are explained. It does not certify every ABI combination, justify replacing production packages or prove that a model load failure is always a driver-installation problem.

## Primary references

[Dynamic Linker Cache Configuration](https://man7.org/linux/man-pages/man8/ldconfig.8.html).

[Linux Dynamic Loader](https://man7.org/linux/man-pages/man8/ld.so.8.html).

[NVIDIA Driver Kernel Modules](https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/latest/kernel-modules.html).

Related reading: [Reproducible inference stacks: preserving a GPU pilot’s result](/journal/software-stack-reproducibility/); [NVML Unknown Error after daemon-reload: when a container loses its GPU](/journal/nvidia-container-nvml-systemd-reload/).
