How To Install ghc-base on CentOS 8

ghc-base is Haskell base library

Introduction

In this tutorial we learn how to install ghc-base on CentOS 8.

What is ghc-base

This package provides the Haskell base library.

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

Install ghc-base on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install ghc-base

Install ghc-base on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install ghc-base

How To Uninstall ghc-base on CentOS 8

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

sudo dnf remove ghc-base

ghc-base Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/23
/usr/lib/.build-id/23/21daab88c3baa282cfa0c0787a451be11cdd09
/usr/lib/.build-id/32
/usr/lib/.build-id/32/f352244d51a9fb408a2889471e6688c2bfc7fd
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/581d7036ccd9069a3c2b048342620e898f45cc
/usr/lib/.build-id/5c
/usr/lib/.build-id/5c/eda01896a1098572ee55b69cc74891a40f2746
/usr/lib/.build-id/62/511585aee13e3af7aaaef122d65322ffc02f78
/usr/lib/.build-id/63
/usr/lib/.build-id/63/c72994077674e22daefd1a184c707f17e4c401
/usr/lib/.build-id/8e
/usr/lib/.build-id/8e/aeb32b9c60e22193ab95a539cea728d5bbb422
/usr/lib/.build-id/d5
/usr/lib/.build-id/d5/b60d0036b9377bc0a88674e01db360f0d64290
/usr/lib/.build-id/f1
/usr/lib/.build-id/f1/252a57f4a72d3a2f71edfe765d4e76c3e3de2f
/usr/lib64/libHSbase-4.10.1.0-ghc8.2.2.so
/usr/lib64/libHSghc-prim-0.5.1.1-ghc8.2.2.so
/usr/lib64/libHSinteger-gmp-1.0.1.0-ghc8.2.2.so
/usr/lib64/libHSrts-ghc8.2.2.so
/usr/lib64/libHSrts_debug-ghc8.2.2.so
/usr/lib64/libHSrts_l-ghc8.2.2.so
/usr/lib64/libHSrts_thr-ghc8.2.2.so
/usr/lib64/libHSrts_thr_debug-ghc8.2.2.so
/usr/lib64/libHSrts_thr_l-ghc8.2.2.so
/usr/share/licenses/ghc-base
/usr/share/licenses/ghc-base/LICENSE
/usr/share/licenses/ghc-base/LICENSE.ghc-prim
/usr/share/licenses/ghc-base/LICENSE.integer-gmp

References

Summary

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