jflex command not found

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

Introduction

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

jflex: command not found

or when using sudo you get the following error message

sudo: jflex: command not found

Solutions to jflex: command not found

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

In Ubuntu jflex is provided by jflex package.

jflex is:

It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University. As Vern Paxon states for his C/C++ tool flex : They do not share any code though.

JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool.

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

sudo apt-get -y install jflex

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

You can also use apt command to install jflex.

sudo apt -y install jflex

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

sudo aptitude install jflex

Summary

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