hypertoc command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
hypertoc: command not found
or when using sudo you get the following error message
sudo: hypertoc: command not found
Solutions to hypertoc: command not found
How To Fix hypertoc: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu hypertoc is provided by libhtml-gentoc-perl package.
libhtml-gentoc-perl is:
HTML::GenToc generates anchors and a table of contents for HTML documents. Depending on the arguments, it will insert the information it generates, or output to a string, a separate file or STDOUT.
While it defaults to taking H1 and H2 elements as the significant elements to put into the table of contents, any tag can be defined as a significant element. Also, it doesn’t matter if the input HTML code is complete, pure HTML, one can input pseudo-html or page-fragments, which makes it suitable for using on templates and HTML meta-languages such as WML.
Also included in the distrubution is hypertoc, a script which uses the module so that one can process files on the command-line in a user-friendly manner.
To fix this problem, we can install more using the command below.
sudo apt-get -y install libhtml-gentoc-perl
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install libhtml-gentoc-perl.
sudo apt -y install libhtml-gentoc-perl
Or if you have aptitude installed you can use the following command.
sudo aptitude install libhtml-gentoc-perl
Summary
In this tutorial we learn how to fix hypertoc command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.