How to Install Build Tools on AlmaLinux or RockyLinux 8/9

AlmaLinux or Rocky Linux are both open-source Linux distros derived from RHEL code and compatible with packages available with RPM extension. Being an enterprise Linux system, Almalinux as well as Rocky used to run server programs and also serve as reliable platforms to develop various applications. Therefore, if you are a developer or just want to build some package using its source code then you need to install “Development Tools” which is also known as Build Tools. The set of essential Development tools is meant to help developers create, compile, and/or modify or test application programs. Let’s check out the commands to get the Build Tools either on AlmaLinux or Rocky.

Step 1: Open AlmaLinux or RockyLinux Terminal

On your server access its command line interface whereas the GUI desktop users can open the Terminal app by searching for it in the Application library. The remote users need to use SSH to perform the command line actions.

Step 2: Update the Linux Package Manager

Before installing some packages from the default system repository of Linux, it is recommended to start with the system update command. It will refresh the package index cache of repositories saved by the package manager, here it is DNF. Hence, execute the given command:

sudo dnf update

Step 3: Install Development Tools Group

AlmaLinux and Rocky Linux both provide most of the common packages to install directly from the BaseOS & AppStream repositories of the system and this is true for “Build Tools” as well. There is a pre-built group of packages that includes essential development tools, hence, on your Terminal run the given command and you will have it.

sudo dnf group install "Development Tools"
Install Build tools almalinux or rocky linux

Step 4: Install Additional Build Tools (Optional)

Well, most of the commonly required development tools will be on our system after running the previous command, however, if someone looking for a specific development tool then that needs to be installed manually.

For example, those who are in Java development will require – the Java development package

sudo dnf install java-devel

Similarly, for Python development:

sudo dnf install python3-devel

Step 5: Verify Installation

We can further also confirm, the successful installation of Development tools on Almalinux or Rocky Linux by checking the versions of the tools installed. For example, check the GCC version:

gcc --version

Uninstallation (optional)

If your project is completed or you don’t want “build tools” on your Linux system anymore then to remove them, we can use the given command:

sudo dnf group remove "Development Tools"
Uninstall Development packages in Almalinux

Other Articles:

Leave a Comment

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