• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ldconfig: command not found

by Deepika

ldconfig is a command-line tool that is used to configure the dynamic linker run-time bindings, by creating, updating, and removing symbolic links and cache files for shared libraries on a Linux system. It is typically run as a system administrator task, typically at boot time and after installing new shared libraries.

The ldconfig command reads the file /etc/ld.so.conf and the directories specified in that file, and creates a cache file that is used by the dynamic linker, ld.so, to resolve shared library dependencies at runtime. The cache file is typically located at /etc/ld.so.cache.

When ldconfig is run, it scans the specified directories and creates symbolic links in the standard library directories, such as /usr/lib, /lib, and /usr/local/lib, that point to the shared libraries found in the scanned directories. It also creates the cache file that is used by the dynamic linker to resolve shared library dependencies at runtime. By default, ldconfig will scan the directories specified in /etc/ld.so.conf, but you can also specify additional directories to scan on the command line. You can use the -p option to display the current contents of the cache file and -v option to see which libraries are being processed.

If you encounter the below error while running the command ldconfig:

ldconfig: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install glibc-source
Ubuntu apt-get install eglibc-source
Arch Linux pacman -S glibc
Kali Linux apt-get install libc-bin
CentOS yum install glibc
Fedora dnf install glibc
Raspbian apt-get install eglibc-source

ldconfig Command Examples

1. Update symlinks and rebuild the cache (usually run when a new library is installed):

# sudo ldconfig

2. Update the symlinks for a given directory:

# sudo ldconfig -n path/to/directory

3. Print the libraries in the cache and check whether a given library is present:

# ldconfig -p | grep library_name

Summary

In summary, ldconfig is a command-line tool that configures the dynamic linker run-time bindings, by creating, updating, and removing symbolic links and cache files for shared libraries on a Linux system. It is typically run as a system administrator task, typically at boot time and after installing new shared libraries. It helps ensure that the system can find and use all of the necessary shared libraries for the programs that are installed on the system.

Filed Under: Linux

Some more articles you might also be interested in …

  1. partprobe Command Examples in Linux
  2. How to find and delete files older than some particular time period in Linux
  3. ffplay: A simple and portable media player using the FFmpeg libraries and the SDL library
  4. How to find docker storage device and its size (device mapper storage driver)
  5. watch command examples to run a command repeatedly or monitor dynamically changeable files (like /proc/*)
  6. nmon: command not found
  7. How to automate sftp file transfers using expect utility
  8. inmake Command Examples
  9. mke2fs: command not found
  10. cpuid: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright