gflags2man command not found

In this troubleshooting guide we learn how to fix gflags2man command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

gflags2man: command not found

or when using sudo you get the following error message

sudo: gflags2man: command not found

Solutions to gflags2man: command not found

How To Fix gflags2man: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu gflags2man is provided by python3-gflags package.

python3-gflags is:

GFlags defines a distributed command line system, replacing systems like getopt(), optparse and manual argument processing. Rather than an application having to define all flags in or near main(), each Python module defines flags that are useful to it. When one Python module imports another, it gains access to the other’s flags.

It includes the ability to define flag types (boolean, float, integer, list), autogeneration of help (in both human and machine readable format) and reading arguments from a file. It also includes the ability to automatically generate man pages from the help flags.

This package provides the Python 3.x module.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-gflags

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-gflags.

sudo apt -y install python3-gflags

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-gflags

Summary

In this tutorial we learn how to fix gflags2man command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.