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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. How to use execl (example included)
  2. printf Command Examples in Linux
  3. Comparing NET-TOOLS V/s IPROUTE Package Commands (ip Vs ifconfig command comparison)
  4. How to Increase the File Download Size Limit in Apache
  5. kvm-img: command not found
  6. ‘ulimit: max user processes: cannot modify limit:operation not permitted’ Shown When Login
  7. How to Manage Zimbra Account Status from CLI
  8. mknod: command not found
  9. Linux Command line Basics – Executing commands from the command line
  10. How to analyze basic system performance using – vmstat, sar, iostat and mpstat

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright