dpkg-checkbuilddeps - Linux


dpkg-checkbuilddeps verifies whether necessary build dependencies for Debian packages are satisfied. It ensures the availability of essential tools and libraries required to build a package from source.


dpkg-checkbuilddeps [options] package-name


  • -a,--all Checks dependencies for all architecture-independent packages.
  • -u,--unmet-only Only lists unmet dependencies.
  • -i,--ignore-missing Ignores missing dependencies.
  • -D,--debug Enables debug mode.
  • --dpkg-checkbuilddeps-flags=FLAGS Passes additional flags to dpkg-buildflags.
  • --no-apt Disables apt dependency checking.
  • --no-dpkg Disables dpkg dependency checking.


Check dependencies for a package:

dpkg-checkbuilddeps foo

Check only unmet dependencies:

dpkg-checkbuilddeps -u foo

Ignore missing dependencies and list all unmet dependencies:

dpkg-checkbuilddeps -i -u foo

Use dpkg-buildflags to ignore optional dependencies:

dpkg-checkbuilddeps --dpkg-checkbuilddeps-flags="--ignore-build-depends-optional" foo

Disable apt dependency checking:

dpkg-checkbuilddeps --no-apt foo

Common Issues

Missing dependencies:

Ensure that necessary repositories are enabled and your sources list is up to date.

Incompatible dependencies:

Check the package versions and ensure they are compatible with your system. Consider using --ignore-missing to proceed despite missing dependencies.


dpkg-checkbuilddeps integrates well with other Linux commands, such as:

  • apt-get: Use it to install missing dependencies: apt-get install $(dpkg-checkbuilddeps -u)
  • dpkg: Verify package dependencies prior to installation: dpkg-checkbuilddeps package1 package2 package3

Related Commands

  • apt-get – Package management tool
  • dpkg – Package management tool
  • dpkg-buildflags – Determine build flags for packages