lddcheck — Finds programs on system with missing library dependencies.
lddcheck
[
-r
FILENAME
| --recurse
FILENAME
] [
-l
FILENAME
| --log-file
FILENAME
] [
-m
FILENAME
| --missing-file
FILENAME
] [
-s
[true]|false
| --sort
[true]|false
] [
-p
[true]|false
| --plain
[true]|false
] [ --strip
[true]|false
] [
-h
[true]|false
| --help
[true]|false
] [
-H
[true]|false
| --help-long
[true]|false
] [
-v
[true]|false
| --verbose
[true]|false
] [ --version
[true]|false
]
The lddcheck is used to track down missing shared libraries that are required by programs (or other libraries). This can be quite useful when preparing a bootable ISO image which is a subset of a full package install.
If you invoke this program without any command line arguments, it will search your ENTIRE file system. You can use various command line options to reduce the amount of the search.
Don't worry if the output from lddcheck
scrolls by too quickly. Details for the files with missing
libraries will be found in lddcheck.log
and
lddcheck.missing
.
It should be noted that lddcheck will NOT detect missing libraries if the application dynamically loads them at run time (instead of being link with them at compile time). However, most programs don't fall into this category.
One can define a custom LD_LIBRARY_PATH
in
the /etc/lddcheck.conf
configuration
file. This allows one to add directories to the library search
path that are not normally searched by the ldd
command. The following example adds many directories containing
shared libraries from the Java run time environment:
# # lddcheck configuration file # # This file is sourced by the lddcheck utility each time it is run. Its # purpose is to build a custom LD_LIBRARY_PATH with directories that are # not in the standard path search by the ldd utility. export LD_LIBRARY_PATH=""; # Add directories containing libraries used by the Java run time environment for d in lib lib/server lib/i386 lib/i386/client lib/i386/xawt; do LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/java/jre/${d}"; done
The following command line options are available:
-r FILENAME
] | [--recurse FILENAME
]
This command line option allows one to specify what
directory to start searching for executable programs and
libraries. We will run each executable through
ldd and see if ldd reports
"not found
" for any of the required
libraries. If this option is omitted, we will start our search
from the root directory (/
).
-l FILENAME
] | [--log-file FILENAME
]
Each time that lddcheck detects
that a required shared library is missing, it will log the name of
the application/library which requires it along with the output of
ldd to this log file. If this command line
option is omitted, the output will be written to
lddcheck.log
in the current working
directory.
-m FILENAME
] | [--missing-file FILENAME
]
Once the lddcheck command
finishes, it will report the list of required shared libraries
that were not found in this log file. This will be a much smaller
log file to review than lddcheck.log
. If this
command line option is omitted, the output will be written to
lddcheck.missing
in the current working
directory.
-s [true]|false
] | [--sort [true]|false
]
By default, the lddcheck command
processes each file as reported by find. If you
set this option to true
, we will run the output
of find through sort prior
to processing. NOTE: Setting this option to
true
will cause a LONG delay before any output
appears.
-p [true]|false
] | [--plain [true]|false
]
By default, the lddcheck utility
will insert escape codes in the standard output (to add color and
spacing). This can be undesirable if you want to redirect the
output to a file which you want to browse later. If this option is
set to true
, lddcheck will
refrain from inserting escape codes into the output.
--strip [true]|false
]
BE CAREFUL! If you set this option to true, this may MODIFY files on your system. The strip command will be run on EVERY file which is found to be stripable (as reported by file).
-h [true]|false
] | [--help [true]|false
]
When this option is specified, lddcheck will display a short one line description of lddcheck, followed by a short description of each of the supported command line options. After displaying this information lddcheck will terminate.
-H [true]|false
] | [--help-long [true]|false
]
This option will attempt to pull up additional
lddcheck documentation within a text based
web browser. You can force which browser we use setting the
environment variable TEXTBROWSER
, otherwise,
we will search for some common ones.
-v [true]|false
] | [--verbose [true]|false
]
When you set this option to true, lddcheck will produce additional output. This is typically used for diagnostic purposes to help track down when things go wrong.
--version [true]|false
]
If this option is specified, the version number of the script is displayed.
/etc/lddcheck.conf
If this file is present, it will be
sourced. The primary purpose for this file is to allow one to
construct and export a custom LD_LIBRARY_PATH
such that the ldd utility will be able to
resolve some of the more obscure libraries (like those found
in the Java run time environment).
lddcheck.log
This file is generated each time you run the program and contains details about which programs had missing shared libraries and some summary statistics.
lddcheck.missing
This file contains a simple list of the libraries that were missing.