latex-encode command not found

In this troubleshooting guide we learn how to fix latex-encode command not found error message

Introduction

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

latex-encode: command not found

or when using sudo you get the following error message

sudo: latex-encode: command not found

Solutions to latex-encode: command not found

How To Fix latex-encode: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu latex-encode is provided by liblatex-encode-perl package.

liblatex-encode-perl is:

LaTeX::Encode provides a function to encode text that is to be formatted with LaTeX. It encodes characters that are special to LaTeX or that are represented in LaTeX by LaTeX commands.

The special characters are: \ (command character), { (open group), } (end group), & (table column separator), # (parameter specifier), % (comment character), _ (subscript), ^ (superscript), ~ (non-breakable space), $ (mathematics mode).

Note that some of the LaTeX commands for characters are defined in the LaTeX textcomp package.

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

sudo apt-get -y install liblatex-encode-perl

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

You can also use apt command to install liblatex-encode-perl.

sudo apt -y install liblatex-encode-perl

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

sudo aptitude install liblatex-encode-perl

Summary

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