aplaymidi: 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/aplaymidi - from package: alsa-utils

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

On Debian possible default full paths are:

/usr/bin/aplaymidi - from package: alsa-utils

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