dh_auto_install - Linux


Overview

dh_auto_install prepares a package of Debian source in a way that allows it to auto-install software packages during installation. It is commonly used to define potential packages to be installed during the installation of a Debian package.

Syntax

dh_auto_install [debhelper options] [auto-install options]

Options/Flags

  • -u, –uninstallable
    Adds a package to the "uninstallable" list.

  • -i, –install
    Adds a package to the "installable" list.

  • -p, –package
    Adds a package to the "suggests" list.

  • -r, –recommends
    Adds a package to the "recommends" list.

  • -V, –versioned
    Set the version information for a package.

Examples

To add the package example to the list of "installable" packages:

dh_auto_install --install example

To add the package example to the list of "suggests" packages:

dh_auto_install --package example

Common Issues

  • Error: package does not exist

This error occurs when you attempt to add a package that does not exist in the repositories. Make sure the package name is correct.

Integration

dh_auto_install can be combined with other tools to automate package management tasks. For example, you can use it to generate a DEBIAN/postinst script that installs additional packages:

#!/bin/sh
set -e

dh_auto_install

apt-get install --no-install-recommends example

Related Commands

  • dh_installdeb
  • dh_installdocs
  • dh_installman