How To Install gc on CentOS 8

gc is A garbage collector for C and C++ A garbage collector for C and C++

Introduction

In this tutorial we learn how to install gc on CentOS 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. gc 7.6.4 3.el8 x86_64 109 k gc-7.6.4-3.el8.src.rpm appstream A garbage collector for C and C++ http BSD 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 CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install gc.

Install gc 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 gc using dnf by running the following command:

sudo dnf -y install gc

Install gc 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 gc using yum by running the following command:

sudo yum -y install gc

How To Uninstall gc on CentOS 8

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

sudo dnf remove gc

gc Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/e6da8d95af63b323838978f5d55a4e6cccb83d
/usr/lib/.build-id/8e
/usr/lib/.build-id/8e/7a4c287eecc1c62ab363e06d21be046b348df0
/usr/lib/.build-id/a8
/usr/lib/.build-id/a8/1c67aa57af20ce09c989aac732ace054b48232
/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
/usr/lib/.build-id
/usr/lib/.build-id/68
/usr/lib/.build-id/68/e5d045bb392e8f70e22d214dd8e60099ef4060
/usr/lib/.build-id/94
/usr/lib/.build-id/94/a35d2d800f1d52f153fa39d819cb3211077e78
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/b1c89daa931906aef86281175e14701d48cc05
/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

References

Summary

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