DH_SHLIBDEPS(1)
π DH_SHLIBDEPS(1) π
okay bestie, buckle up β this one's a manual page from debhelper, and it's all about figuring out which shared libraries your packages need. β¨
β¨ NAME β¨
dh_shlibdeps β calculate shared library dependencies π¦
πΈ SYNOPSIS πΈ
dh_shlibdeps [debhelper options] [-Lpackage] [-ldirectory] [-Xitem]
[-- params]
π DESCRIPTION π
So dh_shlibdeps is a debhelper program, and its whole job β its main character arc, if you will β is calculating shared library dependencies for packages. π
Real talk: this program is lowkey just a wrapper around dpkg-shlibdeps(1). It calls that thing once for every package listed in the control file, and hands it a list of ELF executables and shared libraries it managed to find. That's it. That's the whole vibe. π
π₯ OPTIONS π₯
-Xitem,--exclude=itemβ this one says: exclude any file whose filename contains item anywhere from being passed todpkg-shlibdeps. Which means their dependencies get ignored. π Now β this may be useful in some situations, but use it with caution, fr fr. And you can stack it: use this option more than once to exclude more than one thing.-- paramsβ pass params straight through todpkg-shlibdeps(1). β¨-uparams,--dpkg-shlibdeps-params=paramsβ another way to pass params todpkg-shlibdeps(1). But ngl, this one is deprecated β use--instead. π-ldirectory[:directory ...]β with recent versions ofdpkg-shlibdeps, this option is generally not needed. What it does: it tellsdpkg-shlibdeps(via its-lparameter) to look for private package libraries in the specified directory β or directories, separate them with colons. With recent versions ofdpkg-shlibdeps, this is mostly only useful for packages that build multiple flavors of the same library, or other situations where the library is installed into a directory that's not on the regular library search path. π§-Lpackage,--libpackage=packageβ again, with recent versions ofdpkg-shlibdepsthis is generally not neededβ¦ unless your package builds multiple flavors of the same library, or is relying ondebian/shlibs.localfor an internal library. What it does: it tellsdpkg-shlibdeps(via its-Sparameter) to look first in the package build directory for the specified package when it's searching for libraries, symbol files, and shlibs files. π«Ά
If you need it, you can pass this multiple times with different package names. slay.
π EXAMPLES π
okay imagine this: your source package produces libfoo1, libfoo-dev, and libfoo-bin binary packages. And libfoo-bin links against libfoo1, so it should depend on it. In your rules file, first run dh_makeshlibs, then dh_shlibdeps:
dh_makeshlibs
dh_shlibdeps
The effect of this: it automatically generates a shlibs file for libfoo1, and then uses that file plus the libfoo1 library sitting in the debian/libfoo1/usr/lib directory to calculate shared library dependency info. periodt. π
Now β say a libbar1 package is also produced, and it's an alternate build of libfoo, and it's installed into /usr/lib/bar/. You can make libfoo-bin depend on libbar1 like this:
dh_shlibdeps -Llibbar1 -l/usr/lib/bar
iconic behavior honestly. π
π¦ SEE ALSO π¦
This program is a part of debhelper. π
π AUTHOR π
Joey Hess <joeyh@debian.org>
and that's the whole page bestie, no cap β this was dh_shlibdeps from debhelper version 14.5ubuntu1, dated 2026-09-21. go forth and calculate those deps, you absolute legend πβ¨π
π¦ where this page comes from
- ubuntu stonking: debhelper 14.5ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms