Share your love
Install build-essential on Debian Linux – 3 Easy Steps Guide
This guide intends to teach you to Install build-essential on Debian Linux. The build-essential package is a meta-package in Debian-based Linux distributions. It includes a set of essential packages and tools required for compiling and building software from source code. These tools are commonly used by developers and system administrators when building custom software or installing software that is not available in pre-compiled binary form. Typically, the following components are available in the build-essential package:
- Compiler
- Build Tools
- Development Headers and Libraries
- Linker
- Essential Utilities
Now you can follow the steps below to install build-essential on Debian 11 and Debian 12.
Steps To Install build-essential on Debian Linux
To Install build-essential on Debian Linux, you must log in to your server as a non-root user with sudo privileges. For this purpose, you can check the following Debian Linux initial setup guides:
Initial Server Setup with Debian 11
Initial Server Setup with Debian 12
Now follow the steps below and quickly use a single command to install the build-essential package.
Step 1 – Run System Update on Debian Linux
First, you must update and upgrade your packages on Debian distros. To do this, you can run the commands below:
# sudo apt update
# sudo apt upgrade -y
Step 2 – Command for Installing build-essential on Debian
The build-essential package is available in the default Debian repository. To get the package, you can simply run the command below:
sudo apt install build-essential -y
Example output:
As you can see from the output, it will Install build-essential on Debian Linux.
Step 3 – Easy Steps To Build an App From Source on Debian Linux
To compile and build an application from its source code on Debian Linux, you can use the following general steps:
- Download the Source Code for the application you want to build.
- Install all the required packages and dependencies for building an app from the source on Debian. These are the most common dependencies for building apps from source:
sudo apt install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev -y
- If you downloaded a tarball archive, you need to extract it to your desired directory.
- Then, change your current directory to the app source code directory.
- Run the configuration script. This checks your system for dependencies and prepares the build environment. You may need to specify options depending on your requirements.
sudo ./configure
- Once the configuration is complete, you can compile the source code using the make command. This command reads the Makefile generated during the configuration step and compiles the source files into executable binaries.
sudo make
- After compilation, you can install the application system-wide using the make install command. This will copy the executable binaries and any necessary files to the appropriate directories on your system.
sudo make install
By following the above steps, you can easily build an app from the source.
Conclusion
It is recommended to install the packages from the source instead of using the default packages available in the repository. Because your Debian Linux may not have the available packages. With this option, you can have more control over your packages. Hope you enjoy this guide on Install build-essential on Debian Linux.
Also, you may like to read the following articles:
Upgrade Debian Kernel Without Network Connection
Install Oracle JDK 21 on Ubuntu / Debian