How to install Build-essential on Debian such as 12 and 11

Those who are developers or want to build some package on Linux from its source need to have essential tools for it. And installing build-essential on Debian 12 or 11 Linux it will provide a set of packages and tools for that.

Build-essential is a meta-package that is available on Debian and its based Linux systems such as Ubuntu and Linux Mint. The main task of it to provide a set of essential packages and tools required to build or compile software from its source code. These packages and tools include the GNU Compiler Collection (gcc), GNU Make, binutils, and other important development tools and libraries.

You definitely, if you are an advanced user of Linux, come across a few applications which are open source but not available for Linux systems in binary or executable format. In such cases, we need to build such software from their source code. So that after compiling we have the executable files that can be run on our system. And the build-essential package provides the necessary tools and libraries to do this.

To install the build-essential package on Debian, you can follow these steps:

1. Open a terminal app

On your Debian Linux whether it has a graphical user interface or command line, access the terminal because we need to run the APT package manager and commands we required to install ‘build-essential’.

2. Run APT update

It is quite important to run the system update and upgrade before planning to install packages on Debian Linux. It not only installs the available security updates but also makes sure that our APT package list is up to date.

sudo apt update
sudo apt upgrade

3. Installing build-essential on Debian 11 or 12

As you have completed the previous steps, we can install the build-essential using the given Debian command. This meta-package is available through the system repositories, therefore we don’t need to add any extra repository at all.

sudo apt install build-essential
Installing build essential on Debian 11 or 12

4.  Example to build an app from a source

After installing the build-essential package on your Debian-based system, download the source code of the software that you want to compile. After that build and compile it, here are the basic steps for that:

  1. Download the source code of the software you want to build and compile.
  2. Extract the source code to a directory.
  3. Using the terminal navigate to the extracted where the source code is located.
  4. Inside the directory locate the ‘configure’ script. This script will check your system for any necessary dependencies and generate a Makefile.
./configure
  1. Once the configure script is finished, run the ‘make‘ command to compile the software
make
  1. If the compilation is successful using the ‘make‘ command, you can install the software by running the following command:
sudo make install

Other Articles:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.