Make is a command-line utility that helps Linux users to download and install packages using their source code. The make utility breaks down the large files into smaller pieces and finds out whether the components are compiled or not, and if not, then it compiles them.
This write-up explains the installation method of the make utility on Ubuntu Jammy Jellyfish.
- How to Install Make on Ubuntu 22.04?
- Alternative Installation Method
- How to Use the Make on Ubuntu 22.04?
- How to Remove the Make on Ubuntu 22.04?
How to Install Make on Ubuntu 22.04?
Most of the time, when you install Ubuntu, the make utility has already been installed on Ubuntu, so we can confirm this by displaying the installed version of the Make utility with the command:
$ make -version
The output shows that the make utility is not installed on the system. First, update all the packages of Ubuntu:
$ sudo apt update
To install the make utility on Ubuntu, run the below-mentioned command in the terminal of Ubuntu:
$ sudo apt install make -y
When the package of make utility has been installed, a directory with the name “make” is created in “/usr/bin/” which can be displayed by using the command:
$ ls /usr/bin/make
The make directory confirms the installation of the make utility on Ubuntu.
Alternative Installation Method
You can also install the make utility by installing the “build-essential” package, and the build-essential contains different packages which help build the packages on Ubuntu. To install the build-essential package, use the command:
$ sudo apt install build-essential -y
How to Use the Make on Ubuntu 22.04?
We can use the make command to install different packages using their source code, and to explain this; we will install SQLite3 on Ubuntu using the make command. For this, first, we have to download its Linux binaries:
$ wget -c https://www.sqlite.org/2022/sqlite-autoconf-3400000.tar.gz
After downloading the Linux binaries of the SQLite3, make a directory with the name of “SQLite3” and navigate to it:
$ mkdir SQLite3 && cd SQLite3
Now in the new directory, extract all the Linux binaries:
$ tar xvfz ../sqlite-autoconf-3400000.tar.gz
Now, navigate to the extracted folder of SQLite and start the configuration:
$ cd sqlite-autoconf-3400000 && ./configure
Compile the configured files and start the installation as well with the make command:
$ make && sudo make install
For the confirmation of the installation of SQLite3, we will run the command:
$ sqlite3 --version
How to Remove the Make on Ubuntu 22.04?
If there is no use for the make utility, then it’s better to remove it. The make utility can be removed from Ubuntu using the “purge” option of the apt package manager:
$ sudo apt purge make -y
The package has been removed with its configuration files on Ubuntu.
In Ubuntu, the make utility can be installed by executing the command “sudo apt install make -y”. This utility is quite helpful in compiling/linking the source code to get the specific package on Linux. Alternatively, the users can install the make package using the command “sudo apt install build-essential”. All these installation methods are explained in this post.