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

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

On Debian possible default full paths are:

/usr/sbin/hostapd - from package: hostapd

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