How To Install gengetopt on Fedora 36
Introduction
In this tutorial we learn how to install gengetopt
on Fedora 36.
What is gengetopt
Gengetopt is a tool to generate C code to parse the command line arguments argc and argv that are part of every C or C++ program. The generated code uses the C library function getopt_long to perform the actual command line parsing.
We can use yum
or dnf
to install gengetopt
on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install gengetopt.
Install gengetopt on Fedora 36 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install gengetopt
using dnf
by running the following command:
sudo dnf -y install gengetopt
Install gengetopt on Fedora 36 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install gengetopt
using yum
by running the following command:
sudo yum -y install gengetopt
How To Uninstall gengetopt on Fedora 36
To uninstall only the gengetopt
package we can use the following command:
sudo dnf remove gengetopt
gengetopt Package Contents on Fedora 36
/usr/bin/gengetopt
/usr/lib/.build-id
/usr/lib/.build-id/c0
/usr/lib/.build-id/c0/af5c72b5494d73c113bac8b8f63cf1ac67f56f
/usr/share/doc/gengetopt
/usr/share/doc/gengetopt/AUTHORS
/usr/share/doc/gengetopt/ChangeLog
/usr/share/doc/gengetopt/NEWS
/usr/share/doc/gengetopt/README
/usr/share/doc/gengetopt/THANKS
/usr/share/doc/gengetopt/TODO
/usr/share/doc/gengetopt/examples
/usr/share/doc/gengetopt/examples/README.example
/usr/share/doc/gengetopt/examples/main1.cc
/usr/share/doc/gengetopt/examples/main2.c
/usr/share/doc/gengetopt/examples/sample1.ggo
/usr/share/doc/gengetopt/examples/sample2.ggo
/usr/share/doc/gengetopt/gengetopt.html
/usr/share/doc/gengetopt/index.html
/usr/share/gengetopt
/usr/share/gengetopt/getopt.c
/usr/share/gengetopt/getopt1.c
/usr/share/gengetopt/gnugetopt.h
/usr/share/info/gengetopt.info.gz
/usr/share/info/index.info.gz
/usr/share/licenses/gengetopt
/usr/share/licenses/gengetopt/COPYING
/usr/share/licenses/gengetopt/LICENSE
/usr/share/man/man1/gengetopt.1.gz
References
Summary
In this tutorial we learn how to install gengetopt
on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).