dia2code: 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/dia2code - from package: dia2code

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