How To Install gflags on Rocky Linux 8

In this tutorial we learn how to install gflags on Rocky Linux 8. gflags is Library for commandline flag processing

Introduction

In this tutorial we learn how to install gflags on Rocky Linux 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.

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

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

sudo dnf -y install gflags

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

sudo yum -y install gflags

How To Uninstall gflags on Rocky Linux 8

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

sudo dnf remove gflags

gflags Package Contents on Rocky Linux 8

/usr/bin/gflags_completions.sh
/usr/lib/.build-id
/usr/lib/.build-id/5c
/usr/lib/.build-id/5c/0a6127df9099a7049657a52c21f16ca3a64a3f
/usr/lib/.build-id/94
/usr/lib/.build-id/94/e09c8282935458130f486e5e2ebbb556e611f0
/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
/usr/bin/gflags_completions.sh
/usr/lib/.build-id
/usr/lib/.build-id/6f
/usr/lib/.build-id/6f/af5dd61ebccee9e1c76a49864acfb853778370
/usr/lib/.build-id/ec
/usr/lib/.build-id/ec/1d5359157c97ab39c7672c6d6f4fadab84212d
/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

References

Summary

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