gi-docgen command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
gi-docgen: command not found
or when using sudo you get the following error message
sudo: gi-docgen: command not found
Solutions to gi-docgen: command not found
How To Fix gi-docgen: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu gi-docgen is provided by gi-docgen package.
gi-docgen is:
GI-DocGen is a document generator for GObject-based libraries. GObject is the base type system of the GNOME project. GI-Docgen reuses the introspection data generated by GObject-based libraries to generate the API reference of these libraries, as well as other ancillary documentation.
GI-DocGen is not a general purpose documentation tool for C libraries: while GI-DocGen can be used to generate API references for most GObject/C libraries that expose introspection data, its main goal is to generate the reference for GTK and its immediate dependencies.
GI-DocGen is still in development. The upstream-recommended use of GI-DocGen is to add it as a sub-project to a Meson build system, and vendor it when releasing dist archives. Until GI-DocGen becomes stable, Debian packages that use it for their documentation should use a vendored copy (as allowed by Policy §4.13), and should not have a Build-Depends on gi-docgen unless no vendored copy is present in upstream releases.
To fix this problem, we can install more using the command below.
sudo apt-get -y install gi-docgen
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install gi-docgen.
sudo apt -y install gi-docgen
Or if you have aptitude installed you can use the following command.
sudo aptitude install gi-docgen
Summary
In this tutorial we learn how to fix gi-docgen command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.