• 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

ldd: command not found

by admin

The ldd(1) (list dynamic dependencies) command displays the shared libraries that a program (or a shared library) requires to run. Here’s an example:

$ ldd prog
         libdemo.so.1 => /usr/lib/libdemo.so.1 (0x40019000)
         libc.so.6 => /lib/tls/libc.so.6 (0x4017b000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

The ldd command enables a user to view shared library dependencies for an application. This can be useful for troubleshooting or gathering information about system requirements for an application.

Syntax

The syntax of the ldd command is:

# ldd [options] {program binary}

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

ldd: command not found

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

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

The ldd command resolves each library reference (employing the same search conventions as the dynamic linker) and displays the results in the following form:

library-name => resolves-to-path

ldd Command Examples

1. Display shared library dependencies of a binary:

# ldd path/to/binary

2. Display all information about dependencies:

# ldd --verbose path/to/binary

3. Display unused direct dependencies:

# ldd --unused path/to/binary

4. Report missing data objects and perform data relocations:

# ldd --data-relocs path/to/binary

5. Report missing data objects and functions, and perform relocations for both:

# ldd --function-relocs path/to/binary

Filed Under: Linux

Some more articles you might also be interested in …

  1. git check-ref-format: Checks if a given refname is acceptable, and exits with a non-zero status if it is not
  2. Magento 2 Rabbitmq configuration
  3. lambo Command Examples
  4. hexyl Command Examples
  5. Linux filesystem is filling, despite no large files or directories
  6. LVM Configuration : Physical Volume (PV) Operations/Utilities
  7. csvgrep: Filter CSV rows with string and pattern matching
  8. f3read and f3write Command Examples
  9. hardhat Command Examples
  10. bmaptool Command Examples (Create or copy block maps intelligently)

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