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

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