mathtex command not found

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

Introduction

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

mathtex: command not found

or when using sudo you get the following error message

sudo: mathtex: command not found

Solutions to mathtex: command not found

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

In Ubuntu mathtex is provided by mathtex package.

mathtex is:

MathTeX is a cgi program that lets you easily embed LaTeX math in your own html pages, blogs, wikis, etc. It parses a LaTeX math expression and immediately emits the corresponding gif (or png) image, rather than the usual TeX dvi.

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

sudo apt-get -y install mathtex

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

You can also use apt command to install mathtex.

sudo apt -y install mathtex

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

sudo aptitude install mathtex

Summary

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