gpm-mouse-test: 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/sbin/gpm-mouse-test - from package: gpm

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