src2latex command not found

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

Introduction

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

src2latex: command not found

or when using sudo you get the following error message

sudo: src2latex: command not found

Solutions to src2latex: command not found

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

In Ubuntu src2latex is provided by src2tex package.

src2tex is:

src2tex [resp. src2latex] is a sort of text converter from BASIC, C, C++, OBJECTIVE-C, COBOL, FORTRAN, HTML, JAVA, LISP, MAKE, PASCAL, PERL, SCHEME, SHELL, TCL/TK and ASIR, MACSYMA, MAPLE, MATHEMATICA, MATLAB, MAXIMA, MuPAD, OCTAVE, REDUCE to TeX [resp. LaTeX]. However, it is not a simple pretty-printer; actually, it is designed to fulfill the following desires:

(1) We want to write mathematical formulae in comment area of source program. (2) We would like to patch PS or EPS figures upon source program. (3) We need a simple and easy-to-use tool which enables to combine documentation and manual with source program. (4) We often have to translate our program from text format to TeX format when we want to quote our own program in research report, lecture note, etc. That is quite time consuming, so it should be automated.

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

sudo apt-get -y install src2tex

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

You can also use apt command to install src2tex.

sudo apt -y install src2tex

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

sudo aptitude install src2tex

Summary

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