How To Install gflags on CentOS 8

gflags is Library for commandline flag processing Library for commandline flag processing

Introduction

In this tutorial we learn how to install gflags on CentOS 8.

What is gflags

The gflags package contains a library that implements commandline flags processing. As such it’s a replacement for getopt(). It has increased flexibility, including built-in support for C++ types like string, and the ability to define flags in the source file in which they’re used. gflags 2.1.2 6.el8 x86_64 92 k gflags-2.1.2-6.el8.src.rpm powertools Library for commandline flag processing https BSD The gflags package contains a library that implements commandline flags processing. As such it’s a replacement for getopt(). It has increased flexibility, including built-in support for C++ types like string, and the ability to define flags in the source file in which they’re used.

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

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

sudo dnf -y install gflags

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

sudo yum -y install gflags

How To Uninstall gflags on CentOS 8

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

sudo dnf remove gflags

gflags Package Contents on CentOS 8

/usr/bin/gflags_completions.sh
/usr/lib/.build-id
/usr/lib/.build-id/22
/usr/lib/.build-id/22/1e447a283ca37c931fe79e0b2d2c2a29fb50e1
/usr/lib/.build-id/7a
/usr/lib/.build-id/7a/54b4ce174f2124bb8734ec559732da8f1c1023
/usr/lib64/libgflags.so.2.1
/usr/lib64/libgflags.so.2.1.2
/usr/lib64/libgflags_nothreads.so.2.1
/usr/lib64/libgflags_nothreads.so.2.1.2
/usr/share/doc/gflags
/usr/share/doc/gflags/AUTHORS.txt
/usr/share/doc/gflags/ChangeLog.txt
/usr/share/doc/gflags/README.md
/usr/share/licenses/gflags
/usr/share/licenses/gflags/COPYING.txt
/usr/bin/gflags_completions.sh
/usr/lib/.build-id
/usr/lib/.build-id/d2
/usr/lib/.build-id/d2/697ad823e1b418cf2b5a7b38f186bb38ad1c91
/usr/lib/.build-id/dc
/usr/lib/.build-id/dc/139f035cfed48134e44cabb56e68d0c490ce4b
/usr/lib/libgflags.so.2.1
/usr/lib/libgflags.so.2.1.2
/usr/lib/libgflags_nothreads.so.2.1
/usr/lib/libgflags_nothreads.so.2.1.2
/usr/share/doc/gflags
/usr/share/doc/gflags/AUTHORS.txt
/usr/share/doc/gflags/ChangeLog.txt
/usr/share/doc/gflags/README.md
/usr/share/licenses/gflags
/usr/share/licenses/gflags/COPYING.txt

References

Summary

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