mode2: 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 CentOS possible default full paths are:

/usr/bin/mode2 - from package: lirc

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/mode2 - from package: lirc

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