How To Install ghc-compiler on AlmaLinux 8

In this tutorial we learn how to install ghc-compiler in AlmaLinux 8. ghc-compiler is GHC compiler and utilities

Introduction

In this tutorial we learn how to install ghc-compiler on AlmaLinux 8.

What is ghc-compiler

The package contains the GHC compiler, tools and utilities. The ghc libraries are provided by ghc-libraries. To install all of ghc (including the ghc library), install the main ghc package.

We can use yum or dnf to install ghc-compiler on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install ghc-compiler.

Install ghc-compiler on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install ghc-compiler using dnf by running the following command:

sudo dnf -y install ghc-compiler

Install ghc-compiler on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install ghc-compiler using yum by running the following command:

sudo yum -y install ghc-compiler

How To Uninstall ghc-compiler on AlmaLinux 8

To uninstall only the ghc-compiler package we can use the following command:

sudo dnf remove ghc-compiler

References

Summary

In this tutorial we learn how to install ghc-compiler on AlmaLinux 8 using yum and dnf.