Skip to content

How to Install Development Tools on Debian 13 & 12

Install GCC, G++, make and other development tools on Debian 13 Trixie and Debian 12 Bookworm with build-essential, then test the compiler.

Steps
4
Category
Linux
Covers
Debian
Versions & support
About Debian →
On this page 4 steps

To compile software from source on Debian you need a set of development tools: the GCC C and C++ compilers, make, the C library headers and the Debian packaging helpers. Debian bundles all of them into a single meta-package called build-essential. This guide shows how to install it on Debian 13 “Trixie” and Debian 12 “Bookworm”, check that it works, and add the extra tools most source builds ask for.

Prerequisites

  • A system running Debian 13 or Debian 12 (desktop or server).
  • A user with sudo privileges, or access to the root account.

Step 1 of 4Install build-essential

Refresh the package index, then install the meta-package:

sudo apt update
sudo apt install build-essential

build-essential pulls in these packages as dependencies:

PackageWhat it provides
gccThe GNU C compiler
g++The GNU C++ compiler
makeRuns the build steps defined in a Makefile
libc6-devHeaders and libraries for the GNU C library
dpkg-devTools for building Debian packages

Step 2 of 4Verify the Installation

Check the versions of the compiler and make:

gcc --version
g++ --version
make --version

Debian 13 ships GCC 14 and Debian 12 ships GCC 12, so the first line of gcc --version starts with gcc (Debian 14. on Debian 13 and gcc (Debian 12. on Debian 12. The rest of the version string changes with Debian point releases.

Step 3 of 4Compile a Test Program

Create a small C program to confirm that the toolchain works end to end:

printf '#include <stdio.h>nint main(void) { printf("Hello from GCC\n"); return 0; }n' > hello.c
gcc hello.c -o hello
./hello

If you see Hello from GCC, the compiler, linker and C library headers are all in place.

Step 4 of 4Install Common Extra Build Tools (Optional)

Many source packages use Autotools, CMake or pkg-config, and download code with Git. Install them together:

sudo apt install autoconf automake libtool pkg-config cmake git

If a project’s build fails with a message about a missing header such as openssl/ssl.h, install the matching -dev package, for example libssl-dev. To install every build dependency of a package that exists in Debian’s repositories, enable the deb-src entries in your APT sources and run sudo apt build-dep <package>.

Conclusion

One command, sudo apt install build-essential, gives a Debian 13 or Debian 12 system everything it needs to compile C and C++ software. Add CMake, Autotools and pkg-config when a project calls for them. New to Debian 13? Read what’s new in Debian 13 “Trixie”.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top