dh_link - Linux


dh_link is a tool used in Debian packaging to manage linking and dependencies between packages. It assists in maintaining package relationships and consistency during package builds.


dh_link [-[aou]] [-P<package>] [-D<dependency>]


  • -a: Perform linking only if the linking is architecture-dependent.
  • -o: Do not treat file existence as a dependency.
  • -u: Update the list of dependencies in control files.
  • -P: Explicitly specify the package to create links for.
  • -D: Explicitly specify the dependency package.


Create links for all packages:


Link a specific package:

dh_link -P my-package

Update dependency list for specific dependency:

dh_link -u -D dependency-package

Common Issues

Missing link errors:

  • Ensure that the correct package and dependency are specified.
  • Verify that the dependency package is installed or built.


Use with checkinstall:

checkinstall -D --install=no dh_link

Related Commands