How To Install build-essential on Ubuntu 20.04
Introduction
In this tutorial we learn how to install build-essential
on Ubuntu 20.04.
What is build-essential
build-essential is:
If you do not plan to build Debian packages, you don’t need this package. Starting with dpkg (>= 1.14.18) this package is required for building Debian packages.
This package contains an informational list of packages which are considered essential for building Debian packages. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed.
If you have this package installed, you only need to install whatever a package specifies as its build-time dependencies to build the package. Conversely, if you are determining what your package needs to build-depend on, you can always leave out the packages this package depends on.
This package is NOT the definition of what packages are build-essential; the real definition is in the Debian Policy Manual. This package contains merely an informational list, which is all most people need. However, if this package and the manual disagree, the manual is correct. Task: ubuntu-mate-core, ubuntu-mate-desktop Build-Essential: yes
Package: build-essential Architecture: amd64 Version: 12.8ubuntu1 Priority: optional Section: devel Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Matthias Klose [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 20 Depends: libc6-dev | libc-dev, gcc (>= 4:9.2), g++ (>= 4:9.2), make, dpkg-dev (>= 1.17.11) Filename: pool/main/b/build-essential/build-essential_12.8ubuntu1_amd64.deb Size: 4624 MD5sum: 547e2c7cef285002691b1e0fc1055b7f SHA1: ea6d9ca04160947e5cf4e81b8af56d8f75fe87aa SHA256: 6292fa54511a0d1c0f8c798de35e23318375de006a5df9a7c3369d7d9d7afa84 Description-en: Informational list of build-essential packages If you do not plan to build Debian packages, you don’t need this package. Starting with dpkg (>= 1.14.18) this package is required for building Debian packages.
This package contains an informational list of packages which are considered essential for building Debian packages. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed.
If you have this package installed, you only need to install whatever a package specifies as its build-time dependencies to build the package. Conversely, if you are determining what your package needs to build-depend on, you can always leave out the packages this package depends on.
This package is NOT the definition of what packages are build-essential; the real definition is in the Debian Policy Manual. This package contains merely an informational list, which is all most people need. However, if this package and the manual disagree, the manual is correct. Task: ubuntu-mate-core, ubuntu-mate-desktop Build-Essential: yes
There are three methods to install build-essential
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install build-essential Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install build-essential
using apt-get
by running the following command:
sudo apt-get -y install build-essential
Install build-essential Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install build-essential
using apt
by running the following command:
sudo apt -y install build-essential
Install build-essential Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install build-essential
using aptitude
by running the following command:
sudo aptitude -y install build-essential
How To Uninstall build-essential on Ubuntu 20.04
To uninstall only the build-essential
package we can use the following command:
sudo apt-get remove build-essential
Uninstall build-essential And Its Dependencies
To uninstall build-essential
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove build-essential
Remove build-essential Configurations and Data
To remove build-essential
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge build-essential
Remove build-essential configuration, data, and all of its dependencies
We can use the following command to remove build-essential
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge build-essential
References
Summary
In this tutorial we learn how to install build-essential
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.