lddlibc4 command not found

The ldd command is useful for checking broken links to shared library files. Some years ago I wrote a shell script to bubble through all files in the environment $PATH to look for broken links.

Recently an odd message I noticed is lddlibc4: command not found. I could not replicate the message on all systems.

Eventually I noticed the error appeared only in 32-bit systems.

In my use case the error message occured when a 32-bit version of ldd attempted to check a 64-bit file. Although being a 32-bit system, some 64-bit files are synced to all systems in the house network, such as in /usr/local/[s]bin.

For some odd reason, the 32-bit version of the ldd command, which actually is a script, is different from the 64-bit version. The 32-bit version contains the following snippet:

    # Maybe extra code for non-ELF binaries.
    # Run the ldd stub.
    lddlibc4 "$file"
    # Test the result.
    if test $? -lt 3; then
      return 0;
    # In case of an error punt.
    return 1;

Modern versions of glibc do not support any such lddlibc4 command yet the script has not been updated.

I added an architecture check in the shell script to ignore 64-bit files when running on a 32-bit system.

Posted: Category: Usability Tagged: General

Next: GRUB and LILO

Previous: Updating Multiple Systems