freebsd-lex: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/bin/freebsd-lex - from package: freebsd-buildutils

You may install the required package with command apt-get install {package}
Error in other languages:
freebsd-lex: bevel nie gevind nie
freebsd-lex: comandă negăsită
freebsd-lex: comando não encontrado
freebsd-lex: commande introuvable
freebsd-lex: command not found
freebsd-lex: käsku ei ole
freebsd-lex: không tìm thấy lệnh
freebsd-lex: komanda nerasta
freebsd-lex: Kommando nicht gefunden.
freebsd-lex: kommandot finns inte
freebsd-lex: komut yok
freebsd-lex: nie znaleziono polecenia
freebsd-lex: níor aimsíodh an t-ordú
freebsd-lex: no se encontró la orden
freebsd-lex: no s'ha trobat l'ordre
freebsd-lex: opdracht niet gevonden
freebsd-lex: parancs nem található
freebsd-lex: perintah tidak ditemukan
freebsd-lex: príkaz nenájdený
freebsd-lex: příkaz nenalezen
freebsd-lex: команда не найдена
freebsd-lex: командата не е открита
freebsd-lex: 命令找不到
freebsd-lex: コマンドが見つかりません