mex: 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/mex - from package: texlive-lang-polish

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