ml-lex command not found

In this troubleshooting guide we learn how to fix ml-lex command not found error message

Introduction

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

ml-lex: command not found

or when using sudo you get the following error message

sudo: ml-lex: command not found

Solutions to ml-lex: command not found

How To Fix ml-lex: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ml-lex is provided by ml-lex package.

ml-lex is:

Lexical analysis is the problem of segmenting input into words and recognizing different classes of words. ml-lex uses regular expressions to describe classes of words. It transforms a simple declarative language specification into an efficient SML program for analyzing that language.

Install this package if you want to produce a lexer in Standard ML.

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

sudo apt-get -y install ml-lex

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

You can also use apt command to install ml-lex.

sudo apt -y install ml-lex

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

sudo aptitude install ml-lex

Summary

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