Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between depends and build-depends in debian/control file of dpkg?

Tags:

dpkg

Can anyone please explain what exactly is the difference between depends and build-depends?

Somewhere, I read in build-depends, we add packages required for building our package. As per my understanding, anything needed for building my executable/library should be added here. It may include tools like cmake as well as other dependencies.

And in depends, we put dependencies needed for installation. I don't understand this.

Can anyone please explain?

Thank you.

like image 851
Abhishek Arya Avatar asked Oct 16 '25 14:10

Abhishek Arya


1 Answers

"build-depends" is used to list down the packages which are required to build / create the debian package.

"Depends" lists out the packages which are used for the functioning of the package i.e. when dpkg -i <package_name> is run, it will first install the packages listed under "Depends" and then install the final package as the final package is exporting / using the functionality of the packages defined in "Depends".

like image 57
lokesharo Avatar answered Oct 18 '25 16:10

lokesharo