lex command not working

Asked by Ruchi

am trying lex programming..but its not workin..its giving me error like

ubuntu@ubuntu:~$ lex prog.l
The program 'lex' can be found in the following packages:
 * flex
 * flex-old
Try: sudo apt-get install <selected package>
bash: lex: command not found

What should i do?

Question information

English Edit question
Ubuntu flex Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gilbert Mendoza (gmendoza) said :

Hello Ruchi... The output is actually is telling you what to do. You need to install "flex".

Type in "sudo apt-get install flex" and it will be installed.

Can you help with this problem?

Provide an answer of your own, or ask Ruchi for more information if necessary.

To post a message you must log in.