htags command not found

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

Introduction

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

htags: command not found

or when using sudo you get the following error message

sudo: htags: command not found

Solutions to htags: command not found

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

In Ubuntu htags is provided by global package.

global is:

GNU GLOBAL is a source code tag system that works the same way across diverse environments. Currently, it supports the following:

o command line, and the ‘globash’ query subshell. o vim plugin, and support for other vi clones. o less o emacs o web browser

Supported languages are C, C++, yacc and Java. You can locate a specified function in the source files and move there easily. It is especially useful for hacking large projects containing many subdirectories, many ‘#ifdef’ and many main() functions, like X or kernel source.

Doxygen now supports using global as its source browser, with the USE_HTAGS option.

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

sudo apt-get -y install global

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

You can also use apt command to install global.

sudo apt -y install global

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

sudo aptitude install global

Summary

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