How To Install gc on Rocky Linux 8

In this tutorial we learn how to install gc on Rocky Linux 8. gc is A garbage collector for C and C++

Introduction

In this tutorial we learn how to install gc on Rocky Linux 8.

What is gc

The Boehm-Demers-Weiser conservative garbage collector can be used as a garbage collecting replacement for C malloc or C++ new.

We can use yum or dnf to install gc on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install gc.

Install gc on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install gc

Install gc on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install gc using yum by running the following command:

sudo yum -y install gc

How To Uninstall gc on Rocky Linux 8

To uninstall only the gc package we can use the following command:

sudo dnf remove gc

gc Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/03
/usr/lib/.build-id/03/c5e55917dfb80511205b9d78263bf30f581a1b
/usr/lib/.build-id/aa
/usr/lib/.build-id/aa/7cc053e3aa07fb9097f9adaebc5bed20148ec9
/usr/lib/.build-id/b2
/usr/lib/.build-id/b2/9a8b5969196397aa7438b5f7c4145c539460fc
/usr/lib/libcord.so.1
/usr/lib/libcord.so.1.3.0
/usr/lib/libgc.so.1
/usr/lib/libgc.so.1.3.2
/usr/lib/libgccpp.so.1
/usr/lib/libgccpp.so.1.3.1
/usr/lib/.build-id
/usr/lib/.build-id/7f
/usr/lib/.build-id/7f/36a43eaeaba784e3350bccad1c90575f469840
/usr/lib/.build-id/e4
/usr/lib/.build-id/e4/db5c2219df511b18998c54adc5fb2303abd93c
/usr/lib/.build-id/eb
/usr/lib/.build-id/eb/4485be0d196f6a0dd6dbd6f51f8688c63412c5
/usr/lib64/libcord.so.1
/usr/lib64/libcord.so.1.3.0
/usr/lib64/libgc.so.1
/usr/lib64/libgc.so.1.3.2
/usr/lib64/libgccpp.so.1
/usr/lib64/libgccpp.so.1.3.1

References

Summary

In this tutorial we learn how to install gc on Rocky Linux 8 using yum and dnf.