I was trying to compile nethack today and I needed lex in order to compile it correctly however lex apparently doesn't exist on my machine.
I have flex however which should have lex built into it but after checking I already had it and lex still didn't work as a command.
I then went to /usr/bin and tried to find lex there to make sure it didn't exist and it doesn't. So the issue seems to be that flex isn't install lex when it's installed.