I want to download all (recursive) build dependencies to be able to build apt (debian) package from source. However, when I apt-get install path/*.debs with debs that I got by apt build-dep --download-only --assume-yes <package> apt finds additional packages to be installed and fails, even with --no-install-recommends --ignore-missing. My specific issue got no answer on SO. Then I've investigated further and I have not seen those additional packages in output of successfully run apt build-dep <package>, therefore I've realized (obviously) build dependencies should be tracked differently. How?

I mean there are Depends/Suggests/Recommends fields in a deb file, but I have not seen additional fields related to sourcing. build-dep resulted in ~150 deb files found, but during installation of them as packages, apt found additional dependencies.

I've tried to read Packaging/SourcePackage - Debian Wiki

Source packages provide you with all of the necessary files to compile
or otherwise, build the desired piece of software. It consists, in its
simplest form, of three files:
The upstream tarball with .tar.gz ending
A description file with .dsc ending.

apt source cinnamon-settings-daemon 

Got cinnamon-settings-daemon_5.0.4+uma.tar.xz., search have not found .dsc file inside, maybe Linux Mint (OS I use) implemented modified Debian implementation?

BuildingTutorial - Debian Wiki

apt provides a way of easily installing all the needed dependencies:
Example 1: node-pretty-ms
sudo apt build-dep node-pretty-ms However I have not found description how system keep track of those.

Inside one of downloaded deb files I got with apt build-dep I do not see additional section with dependencies for building/source:

$ apt show /media/ramdrive/debs/cinnamon-settings-daemon/autoconf_2.69-11.1_all.deb
Package: autoconf
Version: 2.69-11.1
Priority: optional
Section: devel
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Ben Pfaff <pfaffben@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1905 kB
Depends: perl (>> 5.005), m4 (>= 1.4.13), debianutils (>= 1.8)
Recommends: automake | automaken
Suggests: autoconf-archive, gnu-standards, autoconf-doc, libtool, gettext
Breaks: gettext (<< 0.10.39), pkg-config (<< 0.25-1.1)
Homepage: http://www.gnu.org/software/autoconf/
Task: ubuntustudio-video
Download-Size: 321 kB
APT-Sources: http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
Description: automatic configure script builder
 The standard for FSF source packages.  This is only useful if you
 write your own programs or if you extensively modify other people's
 For an extensive library of additional Autoconf macros, install the
 `autoconf-archive' package.
 This version of autoconf is not compatible with scripts meant for
 Autoconf 2.13 or earlier.  

Added 1:

One of two packages still listed as "additional" during apt-get install --no-install-recommends is libpulse0:i386. Doing

~$ apt-cache rdepends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances libpulse0:i386 # got ~ 1000 lines

find /path_to_debs/cinnamon-settings-daemon -name *.deb | xargs apt-cache show | grep Package | awk '{print $2}' # ~ 160 debs

and using vlookup in LibreOffice Calc found out it reverse depends on to be installed pulseaudio and pulseaudio-module-bluetooth via e.g. on about ~300th line of rdepends:


Added 2022/01/06:

I understood the cause of initial issue, if interested, see https://stackoverflow.com/a/70601238/14557599 and https://unix.stackexchange.com/a/684975/446998. I was not able to reproduce my claim in this question (I have not seen those additional packages in output of successfully run apt build-dep <package>), maybe I run the command on another system blinded by my incorrect assumption from realizing differences between them mattered.

1 Answer 1


Build dependencies are set by the package maintainer with a Build-Depends: (and sometimes Build-Depends-Indep:) settings in the debian/control file of the source package.

Depends, Recommends, and Suggestions are needed when a package is installed (or about to be installed), so that data is in the Packages file. Build-Depends* are only needed when the package is being built, so is not.

BTW, as you can see from either downloading the source package or using the package tracker (e.g. https://tracker.debian.org/media/packages/a/autoconf/control-2.71-2) the Build-Depends* settings for autoconf are:

Build-Depends-Indep: texinfo (>= 4.6), m4 (>= 1.4.13),
 texlive-base, texlive-plain-generic, texlive-latex-base,
 texlive-latex-recommended, texlive-fonts-recommended, help2man, cm-super
Build-Depends: debhelper-compat (= 13)

Also BTW, this is a simplification. It's enough for most packages, but some packages also have Build-Conflicts*: settings for packages that can not be installed for the build to be successful.

If you haven't already, I suggest that you read the Debian New Maintainers' Guide - some of this is specific to Debian package maintainers, but most of it is generic "how do I build a .deb package" info.

  • Thank you. For cinnamon-settings-daemon control file Build-Depends: lists ~ 30 lines. apt build-dep downloaded ~ 160. Where have it got the rest? There are not build-depends of those in initial control AFAIK as those in control file are already binary, there is not need to recursively build those.-----If the answer is: obviously these are binary depends of those in control, then why has apt build-dep missed several dependencies (as I cannot install downloaded set of debs with apt-get install)? Dec 28, 2021 at 3:13
  • Why those missed binary dependencies are not needed when I install with apt build-dep? Dec 28, 2021 at 3:18
  • if a package Build-Depends on foo-dev and the binary foo-dev package depends on bar, there's no need for the Build-Depends to contain bar.
    – cas
    Dec 28, 2021 at 3:18
  • and no need to install bar to build the package? Dec 28, 2021 at 3:19
  • 1
    bar will be automatically installed when foo-dev is installed.
    – cas
    Dec 28, 2021 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.