Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Managing Debian Software with APT (apt-get etc)
Prev Home Next

6.2 Packages needed for compiling a source package

Normally, specific headers and shared libraries need to be present in order for a source package to be compiled. All source packages have a field in their control files called 'Build-Depends:' that indicates which additional packages are needed for the package to be built from source.

APT has a simple way of downloading these packages. Just run apt-get build-dep package, where `package' is the name of the package you're going to build. For example:

     # apt-get build-dep gmc
     Reading Package Lists... Done
     Building Dependency Tree... Done
     The following NEW packages will be installed:
       comerr-dev e2fslibs-dev gdk-imlib-dev imlib-progs libgnome-dev libgnorba-dev
       libgpmg1-dev 
     0 packages upgraded, 7 newly installed, 0 to remove and 1  not upgraded.
     Need to get 1069kB of archives. After unpacking 3514kB will be used.
     Do you want to continue? [Y/n]

The packages that will be installed are the packages needed in order for gmc to be built correctly. It's important to note that this command doesn't look for the source package of the program to be compiled. You will therefore need to run apt-get source separately to get it.

If all you want is checking what packages are needed to build a given package, there's a variant of the apt-cache show command (see Getting information about packages., Chapter 5, which will show, among other information, the Build-Depends line that lists those packages.

     # apt-cache showsrc package

Managing Debian Software with APT (apt-get etc)
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire